> Which way is it stored in the database? Show the output of this
> statement:
>
> SELECT SongTitle FROM songs WHERE SongTitle like 'hexion';

There are 8 records of Hexion in the database, so after a printout
to the console with a carriage return after each value, I basically get:
Hexion
Hexion
Hexion
Hexion
Hexion
Hexion
Hexion
Hexion

I'm probably missing really obvious, but I can't for the life
of me figure out what. There are no hidden spaces before or
after "Hexion" in the database, so = should work too.

Dan


On Sat, 14 Jun 2008 15:26:08 +0100, Igor Tandetnik <[EMAIL PROTECTED]>  
wrote:

> "Daniel White" <[EMAIL PROTECTED]>
> wrote in message news:[EMAIL PROTECTED]
>> The course of action I thought you implied was to change
>> it from "hexion" to "Hexion", and so I hoped that would
>> return the results, but it still doesn't.
>
> Which way is it stored in the database? Show the output of this
> statement:
>
> SELECT SongTitle FROM songs WHERE SongTitle like 'hexion';
>
>>> You get the number of columns with sqlite3_column_count. The only
>>> way to
>>> get the number of rows is to retrieve all of them (e.g. by calling
>>> sqlite3_step in a loop).
>>
>> Thanks. I'm guessing the inability to obtain the number of rows
>> is an SQL design compromise rather than a fault with sqlite or
>> SQL in general.
>
> I'm not sure I understand the question. But imagine you were
> implementing a relational DBMS. You need to execute a query
>
> select * from someTable where someCondition;
>
> How would you go about figuring the number of records in the resultset,
> short of looking at every record in someTable and evaluating
> someCondition for each? Because if you do look at every record, then
> calculating the count is no easier or faster than just running the query
> and counting the rows.
>
> Igor Tandetnik
>
>
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 
www.skytopia.com
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to