Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bughunter@ru - 03 Feb 2006 08:01 GMT
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
Knut Stolze - 03 Feb 2006 11:18 GMT
> 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?

Signature

Knut Stolze
DB2 Information Integration Development
IBM Germany

miro - 03 Feb 2006 16:53 GMT
>> IMHO, statements like this is mistake typically.
>>
[quoted text clipped - 4 lines]
> 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
Knut Stolze - 03 Feb 2006 17:37 GMT
>>> IMHO, statements like this is mistake typically.
>>>
[quoted text clipped - 11 lines]
>
> 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. ;-)

Signature

Knut Stolze
DB2 Information Integration Development
IBM Germany

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.