RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-12 Thread Eric Pankoke
Actually, I don't think MS SQL's reaction is really all that stupid. In the statement SELECT '500' = 500, I believe it is treating '500' as a field name, and assigning it the value 500. On the other hand, the statement SELECT 500 = '500' would in fact fail, because you can't use an integer as a

FW: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-12 Thread Fred Williams
-Original Message- From: Fred Williams [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 8:37 PM To: [EMAIL PROTECTED] Subject: RE: [sqlite] SQLite version 3 design question: '500'=500? In MySQL: Both return 1 > -Original Message- > From: Keith Herold [mailto:[EMAIL

Re: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-12 Thread Doug Currie
Results from Firebird 1.5 (thanks for the syntax, Andrew)... SQL> select '500' = 500; Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104 -Token unknown - line 1, char 14 -= SQL> select 500 = '500'; Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-12 Thread Keith Herold
In MS SQL 2000, through the query analyzer SELECT '500' = 500 returns 500 . SELECT 500 = '500' returns Server: Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near '='. Beyond these, I have no preference on whether they are true or false; I am less worried

Re: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-12 Thread Tito Ciuro
Hello, On 12 may 2004, at 20:19, D. Richard Hipp wrote: SELECT '500'=500; Is the result "0" or "1"? In other words, what happens when you compare a number to a string that looks like that number. Are they equal or not? I vote for "0". Regards, -- Tito

[sqlite] SQLite version 3 design question: '500'=500?

2004-05-12 Thread D. Richard Hipp
The development team is making progress on SQLite version 3.0. But we've run across an interesting puzzle. What should be returned by this: SELECT '500'=500; Is the result "0" or "1"? In other words, what happens when you compare a number to a string that looks like that number. Are they

RE: [sqlite] execution order of Update

2004-05-12 Thread Keith Herold
As a side note, I thought that the was one of the nice things about SQL in general, that there was no real strong ordering requirement with respect to statements. That was why T-SQL and some of the others introduced more procedural constructs. Is this wrong? --Keith

Re: [sqlite] execution order of Update

2004-05-12 Thread D. Richard Hipp
Rubens Jr. wrote: Is the update command executed in same order that was writen in the sql command ? example : UPDATE t1 SET f1 = f2, f2 = '' WHERE Is garanted that with this command f1 will have the value of f2 BEFORE f2 receive value xxx ? I need to save the value of f2 than update f2,

Re: [sqlite] execution order of Update

2004-05-12 Thread Rubens Jr.
> > No, all consts or data from other column are put into expression before > execution. Read > http://www.sqlite.org/lang.html#update > > I did not notice the " ...All expressions are evaluated before any assignments are made.." Thanks Again ! Rubens Jr. --- Outgoing mail is certified Virus

RE: [sqlite] execution order of Update

2004-05-12 Thread Michal . Otroszczenko
No, all consts or data from other column are put into expression before execution. Read http://www.sqlite.org/lang.html#update -Original Message- From: Rubens Jr. [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 1:54 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] execution

Re: [sqlite] execution order of Update

2004-05-12 Thread Rubens Jr.
> > UPDATE command is evaluated before execution, so you can change a few fields > with one UPDATE. > > Best regards > Michal > Thanks for the fast reply !! But, may the update command evaluate in the inverse order ? In this case : First f2 wil receive value 'xxx', than f1 will receive value of

RE: [sqlite] execution order of Update

2004-05-12 Thread Michal . Otroszczenko
> Is the update command executed in same order that was writen in the sql command ? example : UPDATE t1 SET f1 = f2, f2 = '' WHERE Is garanted that with > this command f1 will have the value of f2 BEFORE f2 receive value xxx ? I need to save the value of f2 than update f2, but I'm not

[sqlite] execution order of Update

2004-05-12 Thread Rubens Jr.
Hi ! Is the update command executed in same order that was writen in the sql command ? example : UPDATE t1 SET f1 = f2, f2 = '' WHERE Is garanted that with this command f1 will have the value of f2 BEFORE f2 receive value xxx ? I need to save the value of f2 than update f2, but I'm not