Problem with User-Defined Variables and Run Routine function

SQL_Hack's profile image SQL_Hack posted 2 weeks ago in General Permalink

I am trying to get my first stored procedure to work and for some reason, when I use the "Run Routine" button to test the code, I am getting a SQL Error 1048. I have created several user-defined variables and the line that isn't working is:

INSERT INTO ffd_update (CMD, SubCMD, SubNumCMD, user_ID, ssyID, Description) VALUES (@CMD, @SubCMD, @SubNumCMD, @user_ID, @ssyID, "Comment");

When I press the Run Routine button, the interface asks for values for each UDV and creates the statement

Call "Recipe_Select"('7002','1','Test','0','0')

Which looks to me like it ought to load 7002 into @CMD and then insert that into the column CMD but the interpreter replies:

/ SQL Error (1048): Column 'CMD' cannot be null /

What am I missing?

1 attachment(s):
  • Capture-05

Please login to leave a reply, or register at first.