|
DECLARE @ArticleId INT --- Define a variable of integer type
SET @ArticleId = @@ IDENTITY --- Set the variable to auto-increment column
--- Insert into the CrossArticleRole table, the record content is dbo.csvToInt (@Roles) The result content csvToInt This is a function
INSERT INTO CrossArticleRole SELECT @ArticleID, intValue FROM dbo.csvToInt (@Roles)
--- Insert into the CrossArticleCategory table, the record content is dbo.csvToInt (@Categories) result content csvToInt This is a function
INSERT INTO CrossArticleCategory SELECT @ArticleID, intValue FROM dbo.csvToInt (@Categories) |
|