dbTalk Databases Forums  

Controlling the start of Seed value

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Controlling the start of Seed value in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Vardinghus
 
Posts: n/a

Default Controlling the start of Seed value - 06-03-2005 , 05:41 AM






This works:

cREATE TABLE #test (
[Testløbenr] [int] IDENTITY (5000,1) NOT NULL ,
[Indhold] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)


insert into #test
(Indhold)
select 'def'

.....and this don't:

declare @max as int

select @max = 5000

CREATE TABLE #test (
[Testløbenr] [int] IDENTITY (@max,1) NOT NULL ,
[Indhold] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)

insert into #test
(Indhold)
select 'def'

Is there another way of controlling the starting number in the temp-table ?




Reply With Quote
  #2  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: Controlling the start of Seed value - 06-03-2005 , 06:15 AM






Got it solved by making an extra column wich I update afterwards...
"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote

Quote:
This works:

cREATE TABLE #test (
[Testløbenr] [int] IDENTITY (5000,1) NOT NULL ,
[Indhold] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL
)


insert into #test
(Indhold)
select 'def'

....and this don't:

declare @max as int

select @max = 5000

CREATE TABLE #test (
[Testløbenr] [int] IDENTITY (@max,1) NOT NULL ,
[Indhold] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL
)

insert into #test
(Indhold)
select 'def'

Is there another way of controlling the starting number in the temp-table
?






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.