| |

VerySource

 Forgot password?
 Register
Search
View: 656|Reply: 2

Can anyone help me see what this code means? Thank you!

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-8 09:20:01
| Show all posts |Read mode
DECLARE @ArticleId INT
SET @ArticleId = @@ IDENTITY
Ranch
INSERT INTO CrossArticleRole SELECT @ArticleID, intValue FROM dbo.csvToInt (@Roles)
INSERT INTO CrossArticleCategory SELECT @ArticleID, intValue FROM dbo.csvToInt (@Categories)
Reply

Use magic Report

0

Threads

88

Posts

55.00

Credits

Newbie

Rank: 1

Credits
55.00

 China

Post time: 2020-1-9 02:45:02
| Show all posts
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)
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-11 09:00:02
| Show all posts
DECLARE @ArticleId INT --- Define a variable of integer type
SET @ArticleId = @@ IDENTITY --- Set the variable to auto-increment column
-------------------------
DECLARE @ArticleId INT
SET @ArticleId = @@ IDENTITY
select @ArticleId
How come the result is null?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list