Declare @last_diary_id int, @initial_seed int Select @last_diary_id = 17000 -- this actualy happens else wher in...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
the code Select @initial_seed = @last_diary_id + 1 Select @initial_seed Create Table #ClaimNoDiary (table_id int IDENTITY(@initial_seed ,1) PRIMARY KEY, adjuster varchar(50), account varchar(50))
The error I get is:
Server: Msg 170, Level 15, State 1, Line 8 Line 8: Incorrect syntax near '@initial_seed'.
DBCC CHECKIDENT ('#ClaimNoDiary', RESEED, @initial_seed);
Dig Deeper on SQL-Transact SQL (T-SQL)
Related Q&A from Roman Rehak
There are a few things you can do to tune SQL Server for improved reporting performance. Here are some generic and Reporting Services-specific ...continue reading
Learn why using a SQL Server stored procedures vs. a trigger can be a preferred method to retrieve data notification from a database field.continue reading
Learn SQL Server commands to manipulate column names in a table and turn column names into variables or rename SQL columns.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.