|
Posted by Stu on 11/22/05 17:02
A poor carpenter blames his tools.
Not trying to pick on you, but DTS is very powerful; there are some
things that it's not good at, but chewing up CORRECT SQL syntax is not
one of them.
If you want to add an identity column in one step, you can use a
subquery for the UNION statement:
SELECT SELECT IDENTITY(int,1,1) as splat, blah
INTO newTable
FROM (SELECT blah
FROM oldtable
UNION --do you need DISTINCT values? UNION ALL will be faster
SELECT blah
FROM oldTable2) x
Stu
Navigation:
[Reply to this message]
|