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 > Query correction - DB2 Update

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-11, 02:54
kayal kayal is offline
Registered User
 
Join Date: Sep 2011
Posts: 8
Query correction - DB2 Update

Dear Friends,

I'm not sure what is wrong with the following query.

update mast_1 set (SELECT_CLAUSE, FROM_CLAUSE, WHERE_CLAUSE, GROUP_BY_CLAUSE, HAVING_CLAUSE) = select (SELECT_CLAUSE, FROM_CLAUSE, WHERE_CLAUSE, GROUP_BY_CLAUSE, HAVING_CLAUSE) from MAST_2 where work_id = 1234;


If this query is wrong, pls give me corrected or equivalent query.

Thanks,
Kayal.
Reply With Quote
  #2 (permalink)  
Old 09-27-11, 03:30
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
have yoy tried the query or tried to analyze the query ?
what is the error message ?
have you tried to qualify the column names ?
where work_id = 1234 -- does this belong to the update or to the select mast_2 ?
"pls give me corrected or equivalent query. " -- we provide hints/tips : no solution
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.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