On 6/27/07, jose isaias cabrera <[EMAIL PROTECTED]> wrote:

> On Tue, 2007-06-26 at 17:50 -0400, jose isaias cabrera wrote:
>> Greetings.
>> CREATE TABLE LSOpenJobs
>>         (
>>          id integer primary key, ProjID integer, subProjID, parent,
>> children, login, cust, proj, PClass, PSubClass, bdate, ddate, edate, pm,
>> pmuk, lang, vendor, vEmail, invoice, ProjFund, PMTime, A_No, wDir,
>> BiliDir,
>> TMDir, DeliveryDir, paid, paidDate, notes, status
>>         );

> It's about the differences between a string and a number, how
> they compare and when a string is converted to a number. See
> section 3 of this page:
>
>  http://www.sqlite.org/datatype3.html

Ok, Dan, I agree.  But why do these both work?

sqlite> select * from LSOpenJobs where id=247;
247|245|245|245||...|n||c

and this one...

sqlite> select * from LSOpenJobs where id='247';
247|245|245|245||...|n||c

Should the last one not work?

Column 'id' has integer affinity (actually, "integer primary key" is
special, but that's not relevant here), so it tries to convert text to
integer before comparing, since it always does the same when storing
values there.  You will see the same behavior with column ProjID.
Column subProjID will not convert anything, since you did not specify
a type affinity for it.

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to