Adrian:  Thanks for the quick answer.  But when I use a variable for the 1000, I
get an error message (incorrect syntax). (however I do not get any when using 
the
number 1000)  SET @iStart = (SELECT MAX(i_AlbumID) + 1 FROM tAlbum) CREATE TABLE
#tempSamples (
i_SamplesNewID int IDENTITY(@iStart, 1) NOT NULL ,
i_SamplesOldID int NOT NULL ,
fk_Item int NULL ,
s_Caption Varchar (8000) NULL 
) ON [PRIMARY]  I tried a Convert as well on the @iStart, but nothing worked.  
Is
it not possible then?  Thanks again Andy 


----- Original Message ----- From: Adrian Forbes - ITD [mailto:[EMAIL PROTECTED]
Sent: 1/25/2005 10:14:17 AM To: [email protected] Subject: RE:
[ASP] Create Table With Identity Column 
Use IDENTITY (1000, 1)


1000 is the start value and 1 is the increment. You need to supply both.


-----Original Message-----

From: Andy and Kim Mills [mailto:[EMAIL PROTECTED] 
Sent: 25 January 2005 3:09

To: [email protected]

Subject: [ASP] Create Table With Identity Column




Hello Guys:


I want to create this table, but want the IDENTITY to start at a number say

(1000). How do I create it and get the IDENTITY to start at a predifned

number? I tried IDENTITY(1000) and this didn't work.


CREATE TABLE #tempSamples (

i_SamplesNewID int IDENTITY NOT NULL ,

i_SamplesOldID int NOT NULL ,

fk_Item int NULL ,

s_Caption Varchar (8000) NULL 
) ON [PRIMARY]


Thanks

Andy




--------------------------------------------------------------------- 
Home :  
[http://groups.yahoo.com/group/active-server-pages]http://groups.yahoo.com/group/active-server-pages

---------------------------------------------------------------------

Post : [email protected]

Subscribe : [EMAIL PROTECTED]

Unsubscribe: [EMAIL PROTECTED]

--------------------------------------------------------------------- 
Yahoo! Groups Links







The contents of this email and any attachments are sent for the personal 
attention

of the addressee(s) only and may be confidential. If you are not the intended

addressee, any use, disclosure or copying of this email and any attachments is

unauthorised - please notify the sender by return and delete the message. Any

representations or commitments expressed in this email are subject to contract.


ntl Group Limited




--------------------------------------------------------------------- 
Home :  
[http://groups.yahoo.com/group/active-server-pages]http://groups.yahoo.com/group/active-server-pages

---------------------------------------------------------------------

Post : [email protected]

Subscribe : [EMAIL PROTECTED]

Unsubscribe: [EMAIL PROTECTED]

--------------------------------------------------------------------- 



--------------------------------------------------------------------------------
Yahoo! Groups Links 

 � To visit your group on the web, go to:
 [http://groups.yahoo.com/group/active-server-pages/] 
http://groups.yahoo.com/group/active-server-pages/

To unsubscribe from this group, send an email to:
 [mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]

Your use of Yahoo! Groups is subject to the  
[http://docs.yahoo.com/info/terms/]Yahoo!
Terms of Service .






[Non-text portions of this message have been removed]



---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to