We're having some difficulty with a scope_identity var that gets returned from an insert. When printed, it is correct, but when we try to use it for another insert, nothing is ever inserted into the table.
Here is the first insert:
Insert into Master_Node (a bunch of cols)
Values (a bunch of vars)
SELECT SCOPE_IDENTITY() AS @pINodeID
print @pINodeID - this prints out the correct values
insert into Links (Link_Name, Parent_INode_ID) Values (@Links, @pINodeID) - when this inserts, the "Parent_INode_ID" value is ,null>
anyone know why? This is our last bug to completing the procedure.
Thanks in advance.
Here is the first insert:
Insert into Master_Node (a bunch of cols)
Values (a bunch of vars)
SELECT SCOPE_IDENTITY() AS @pINodeID
print @pINodeID - this prints out the correct values
insert into Links (Link_Name, Parent_INode_ID) Values (@Links, @pINodeID) - when this inserts, the "Parent_INode_ID" value is ,null>
anyone know why? This is our last bug to completing the procedure.
Thanks in advance.