Archives of the TeradataForum
Message Posted: Mon, 08 Jan 2007 @ 13:27:34 GMT
Subj: | | Re: UPDATE with a SUBQUERY |
|
From: | | Michael Larkins |
Sri:
It returned an error because it is an illegal use of the SET. You can set a column equal to a value or a column. So what you have to do is
make your (select...) a column. So you need to use a derived table. Therefore your SQL should look like this:
Update
from ((select count(*) as cnt from ) dt
Set = cnt
Where
And ;
Hope this helps,
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
|