|
Archives of the TeradataForumMessage Posted: Sun, 20 Aug 2006 @ 10:29:57 GMT
I think the subquery is selecting more than one row from the table s1_test. Presently it should return only one row which is possible if we have UPI or USI in the where clause of subquery. If table s1_test has a UPI or USI try to include a where condition to return one row from the subquery. Merge-into has some restriction which is not fully ANSI-complaint in 6.1. It's expected that it will be ANSI-complaint in 7.0 A note from SQL reference: "Subquery - a singleton subquery table expression that specifies the source table for the merge with a cardinality of at most one row. subquery can reference any of the following: * rows in the queried table * constants * USING row descriptor variables The WHERE clause for subquery must include an equality condition on the UPI or USI of the queried table to ensure a singleton select." Hope this helps ! Thanks, Praveen
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||