Valid query or not???

Database

Valid query or not???

UPDATE = ( subquery returning a single value );

I'm using a Teradata V2R6.1 , is this a valid query??

when executing such a query, i get an error stating
2 REPLIES
Enthusiast

Re: Valid query or not???

Can u post the exact quey ?
Enthusiast

Re: Valid query or not???

You are probably trying an oracle syntax that doesn't work on Teradata.

you will have to try something like this ...

UPDATE A
FROM TblA A, (subquery returning a single value) B
SET cola = B.colB
WHERE A.keya = ??
;

if you hit on some perf issues (check the plans etc ...) you might want to revisit how the subquery itself is formulated , (So that optimizer ALSO knows that the subquery can return only one value.