469,270 Members | 1,725 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

" select * from sysibm.sysdummy1 where; ". Hmm...

IMHO, statements like this is mistake typically.

May be more better made this construction - I said about empty WHERE -
invalid? A lot of data will saved... :-)

Andy

Feb 3 '06 #1
3 14324
bughunter@ru wrote:
IMHO, statements like this is mistake typically.

May be more better made this construction - I said about empty WHERE -
invalid? A lot of data will saved... :-)


Such a statement is syntactically incorrect. So DB2 is right about
rejecting it. After all, just adding the WHERE keyword if the where-clause
is empty is not really a big deal, is it?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 3 '06 #2
Knut Stolze wrote:
bughunter@ru wrote:
IMHO, statements like this is mistake typically.

May be more better made this construction - I said about empty WHERE -
invalid? A lot of data will saved... :-)


Such a statement is syntactically incorrect. So DB2 is right about
rejecting it. After all, just adding the WHERE keyword if the where-clause
is empty is not really a big deal, is it?


Actually, the statement is syntactically correct (try it for yourself
;-). DB2 SQL compiler doesn't use reserved keyword, so in this case
where is simply a correlation name (see subselect section in the SQL
Reference) for the table sysibm.sysdummy, equivalent to:

select * from sysibm.sysdummy as where

Regards,
Miro
Feb 3 '06 #3
miro wrote:
Knut Stolze wrote:
bughunter@ru wrote:
IMHO, statements like this is mistake typically.

May be more better made this construction - I said about empty WHERE -
invalid? A lot of data will saved... :-)


Such a statement is syntactically incorrect. So DB2 is right about
rejecting it. After all, just adding the WHERE keyword if the
where-clause is empty is not really a big deal, is it?


Actually, the statement is syntactically correct (try it for yourself
;-). DB2 SQL compiler doesn't use reserved keyword, so in this case
where is simply a correlation name (see subselect section in the SQL
Reference) for the table sysibm.sysdummy, equivalent to:

select * from sysibm.sysdummy as where


We are both correct. You are using the "where" as a correlation name and I
said explicitly "WHERE keyword". I knew why I phrased it that way. ;-)

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 3 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Mike Gemmell | last post: by
7 posts views Thread by alessandro menchini | last post: by
2 posts views Thread by gimme_this_gimme_that | last post: by
1 post views Thread by kropinek | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.