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 > Need Immediate Help on UPDATE SQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-28-04, 23:09
deepakatfre deepakatfre is offline
Registered User
 
Join Date: Jun 2004
Posts: 32
Need Immediate Help on UPDATE SQL

Hi
This is on UDB 8.01.005

I want to know how could I convert this sybase query into UDB

UPDATE TABLE A
SET B.price = A.PRICE
FROM
TABLE A, TABLE B
Where
A.no = B.no And
A.dt = B.dt
Reply With Quote
  #2 (permalink)  
Old 08-28-04, 23:18
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Try this (but I have not tested it):

UPDATE TABLE A
SET A.Price =
( SELECT B.Price
FROM TABLE B
WHERE A.no = B.no
AND A.dt = B.dt )
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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