Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT UPDATE QUERY HELP

Status
Not open for further replies.

waqarali99

Programmer
May 18, 2007
2
US
Hello:

How can I make this work in teradata. I know something would 100% work in SQL Server but can't make it working in Tdata. Any help would be grately appreciated. Thanks.

UPDATE
TNATDATA.CYBPRCU01
SET
TNATDATA.CYBPRCU01.SHOP_NBR = A.HOME_SHOP_NBR
FROM
TNATDATA.FACT_HR_ASCPAYINFO A,
TNATDATA.CYBPRCU01 B
WHERE
A.EMP_NBR = B.PAYROLL_NBR AND
A.WK_END_DATE = '2007-03-17'

-Waqar
-Email: waqarali_pk@hotmail.com
 
Try this:

UPDATE TNATDATA.CYBPRCU01
SET SHOP_NBR = TNATDATA.FACT_HR_ASCPAYINFO.HOME_SHOP_NBR
WHERE
TNATDATA.FACT_HR_ASCPAYINFO.EMP_NBR = TNATDATA.CYBPRCU01.PAYROLL_NBR AND
TNATDATA.FACT_HR_ASCPAYINFO.WK_END_DATE = '2007-03-17'


Cheers,
Pramod
 
FYR.

UPDATE B
FROM
TNATDATA.FACT_HR_ASCPAYINFO A,
TNATDATA.CYBPRCU01 B
SET
SHOP_NBR = A.HOME_SHOP_NBR
WHERE
A.EMP_NBR = B.PAYROLL_NBR AND
A.WK_END_DATE = '2007-03-17'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top