Hi all,
I'm using SELECT INTO with OPENXML but I can't specify an IDENTITY column in the WITH clause, I keep getting "Incorrect syntax near the word "IDENTITY". The XML doc doesn't contain the ID value I want to use.
SELECT xml.a, xml.b, xml.c,
xml.d, xml.e, xml.f,
xml.g, xml.h, xml.i
INTO dbo.table
FROM OPENXML(@nDoc, '/level1/level2/level3', 2)
WITH (
TableID int IDENTITY(1,1),
a int 'level4/level5',
b int 'level4/level6',
c int 'level4/level7',
d int 'level4/level8',
e int 'level4/level9',
f int 'level4/level10',
g int 'level4/level11',
h int 'level4/level12',
i int 'level4/level13'
) xml
Any ideas?