![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I think I solved the problem my self ALTER PROCEDURE "DBA"."storedproc1"( in iTest char(1) BEGIN insert into #temp select column1,,,,,column30 from testA select * from #temp <-- end ALTER PROCEDURE "DBA"."storedproc2"( in iTest char(1) BEGIN select column1,,,,,column30 , columnextra as extra from storedproc1 (iTest) end |
#4
| |||
| |||
|
|
Because iam sick and tired of this next error: "%1 returned a result set with a different schema than expected" , I thought, why not use temporary tables?? I'm selecting all data from a stored procedure with like 30 columns from joined tables in it in a second stored procedure and created extra columns with calculated values and the 30 columns from the first stored proc in it. This second stored proc also has a subquery in it and iam using parameters to fetch the data out of the first stored proc. I need the stored procedure for a .net application to create csv files. My question is how to use/create a temporary table in the first stored procedure and fetch the data from this table in the second stored proc. with parameters? This is my start ALTER PROCEDURE "DBA"."storedproc1"( in iTest char(1) BEGIN insert into #temp select column1,,,,,column30 from testA end ALTER PROCEDURE "DBA"."storedproc2"( in iTest char(1) BEGIN ???? select column1,,,,,column30 , columnextra as extra from storedproc1 (iTest) ????? end |
![]() |
| Thread Tools | |
| Display Modes | |
| |