Friday, May 15, 2009

Create IDENTITY column in select into statement

SELECT IDENTITY(INT, 10, 1) AS id1,[Product URL] AS ProductURL, CITY, DESCRIPTION, EVENTDATE, EVENTDAY, EVENTMONTH, EVENTMONTH2,
EVENTYEAR, EVENTZTIME, GENRE, GENREGRANDPARENT, GENREPARENT, ID, IMAGE_URL, REGION, STATE, VENCONFIG,
 VENUE, VENUE_ID, ZIP, GenType.GENREType AS GenType into Full_Affiliate_Feed
FROM [Full_Affiliate_Feed_CJ]
LEFT outer JOIN GenType ON GENREGRANDPARENT=GenType.GenName

No comments: