I am trying to create a stored procedure and can not get temp tables created in the proc to pass to subsequent steps of the same proc.
The first step SELECTs INTO a temp table #tblCertRollTest
The next step uses that table to SELECT INTO another temp table #tblTest
#tblTest is used to...
I am trying to create and run a dynamic Sql statement in a stored procedure.
The part of the proc that creates the @Sql is
"SET @SQL =
'SELECT IDENTITY(int, 1, 1) AS Testid, rtblCertRollTest.SapLotNumber,
rtblCertRollTest.SapRoll, rtblCertRollTest.Ply, '
+ @tstTable + '.SapLotNumber AS...
I have a table with a column that may be null and may have data.
If the field is null I want to copy from the previous record. The first record will not be null.
Table:
Group Unit Data
123 1 Alpha
123 2 <null>
123 3 <null>
123 4 Beta
123 5...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.