December 19, 2006 at 5:37 pm
Hi,
in my SSIS package I am trying to use ALTER TABLE command in the Execite SQL Task container like:
ALTER TABLE OfficeZipInfo ALTER COLUMN SEQ_NBR IDENTITY (1,1)
BUt when I parse the query it always say "The query failed to parse, Incorrect syntax near the keyword 'IDENTITY'."
Cannot I use these DDL statements in Execute Task Container? If not, how can I do it?
Thanks,
Sunil
December 19, 2006 at 11:18 pm
Is SEQ_NBR column is existing column with identity or you want to make existing column idenity?
1. In SQL mobile edition you can use alter table alter column command to change the seed and icrement values..
2. I don't think you can use the same alter table alter column command in other edition to change seed and increment values...
3. And I don't think you use alter table alter column command to add identity property to the table.
MohammedU
Microsoft SQL Server MVP
December 20, 2006 at 10:38 am
Yes, SEQ_NBR is already a IDENTITY Column.
Actually I issue a delete command to delete all the records from the table.
I want to reset the seed value after deleting all the records.
Thanks,
Sunil
December 20, 2006 at 11:06 am
Then you should use DBCC CHECKIDENT.. read BOL for details...
http://msdn2.microsoft.com/en-us/library/ms176057.aspx
MohammedU
Microsoft SQL Server MVP
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply