If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Keywords in DB2!!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-17-06, 02:54
tushar149 tushar149 is offline
Registered User
 
Join Date: Sep 2006
Posts: 9
Keywords in DB2!!!

Hi to All
Suppose i have query like this
"User" is keyword in DB2 same as in SQL server.
But my problem is that in SQL server my problem is solved byt writing following query

Select * from [user] where [user]="" && Here i want to check blank user in user table.. Where as in DB2

this bracket wont work because in DB2 to manage keywords there you have to write those words in quotes for e.g. "user". so in DB2 my above query would be...

Select * from "user" where "user"="" && Here i want to check blank user in
now problem with DB2 query is that i am checking blank user in query so the double quotes wont work..and single quotes also wont work for e.g.

Select * from 'user' where 'user="" && Here i think single quotes wont work

Can anybody give me solution....

Regards,
Tushar
Reply With Quote
  #2 (permalink)  
Old 09-17-06, 04:25
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
What about
Code:
Select * from "user" where "user"=''
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On