Marnen Laibow-Koser wrote:
> John Duu wrote:
> [...]
>> so don't know if WHERE (defects.org IN
>> ('NULL')) is equivalent to org IS NULL or if this syntax is a JavaDB
>> specific.
>
> It is not equivalent at all. See the apostrophes around 'NULL'? That
> means it's the literal string NULL, not the SQL null value.
>
> If you knew SQL, this would be trivially self-evident. Please learn
> SQL.
>
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
> [email protected]
If WHERE (defects.org IN ('NULL')) select the string literal 'NULL',
then the data selected is wrong, no?
I would expect
#<Defect id: 1, org: "NULL", created_at: "2010-10-04 00:14:20",
updated_at:
"2010-10-04 00:14:20>
but instead, I actually get
#<Defect id: 1, org: nil, created_at: "2010-10-04 00:14:20", updated_at:
"2010-10-04 00:14:20>
(org is string data type).
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.