[Rails] ActiveRecord: It's not only quoting
Jarkko Laine
jarkko at jlaine.net
Fri Dec 17 08:25:42 GMT 2004
On 17.12.2004, at 10:06, <contact at maik-schmidt.de> wrote:
>
> Additionally, most of the "SELECT" statements will not work with NULL
> values. In DB2 it's not possible to run a statement like "SELECT * FROM
> x WHERE y = NULL". It has to be "SELECT * FROM x WHERE y IS NULL".
I think the latter is the SQL standard and works for sure in Oracle and
PostgreSQL.
>
> I've found some SQL statements using the "LIMIT" clause. This does not
> exist in DB2 (at least not in Version 7) and it has to be replaced by
> "fetch first <x> rows only". In Oracle I've always used "WHERE ROWNUM <
> x" and I do not know, if Oracle has a "LIMIT" keyword.
No, it doesn't, at least in 8i. You have to use the rownum trick.
>
> I think it's not a good idea to clutter the code base with esoteric
> DB2/Oracle/... knowledge. Any suggestions?
I think limiting the result set is crucial and the adapter needs to
know how to handle that.
//jarkko
>
> Cheers,
>
> Maik
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Jarkko Laine
http://jlaine.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2363 bytes
Desc: not available
Url : http://one.textdrive.com/pipermail/rails/attachments/20041217/822c5e5e/smime.bin
More information about the Rails
mailing list