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
-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
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
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
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
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
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
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,
>
> 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
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
>
> 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
> 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
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
13 matches
Mail list logo