﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Database  / Merge help / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Sat, 06 Sep 2008 12:31:44 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Merge help</title><link>http://www.teradata.com/teradataforum/Topic11412-9-1.aspx</link><description>Thanks a lot Fred Pluebell.I have done the same which you told.Thanks for you help.</description><pubDate>Tue, 13 May 2008 08:46:57 GMT</pubDate><dc:creator>Monika</dc:creator></item><item><title>RE: Merge help</title><link>http://www.teradata.com/teradataforum/Topic11412-9-1.aspx</link><description>The "UPSERT" form does not allow a FROM clause (joined update). If using TD12.0, consider MERGE. (If you are not on TD12.0, MERGE is restricted to single-row operations - so appears unlikely to handle what you are trying to do.)Or do it in two parts, joined UPDATE followed by INSERT ... SELECT ... WHERE NOT EXISTS</description><pubDate>Mon, 12 May 2008 21:35:33 GMT</pubDate><dc:creator>Fred Pluebell</dc:creator></item><item><title>Merge help</title><link>http://www.teradata.com/teradataforum/Topic11412-9-1.aspx</link><description>Hi all,when I run the below sql it giving error.could anyone correct me, what is wrong with it. update emp from (select b.emp_no emp_no,b.emp_name emp_name, b.emp_code emp_code, b.salary from emp2 a,emp1 b where a.emp_no=b.emp_no) c set salary=salary*2 where emp_no=c.emp_no else insert into emp(emp_no,emp_name, emp_code, salary)values(c.emp_no,c.emp_name,c.emp_code,salary);*** Failure 5565 The UPDATE specified in the UPSERT statement is a complex update.                Statement# 1, Info =485  *** Total elapsed time was 1 second.</description><pubDate>Mon, 12 May 2008 04:17:57 GMT</pubDate><dc:creator>Monika</dc:creator></item></channel></rss>