Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combine the return values in a single table
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00953147
Message ID:
00953173
Views:
20
we already have proc1 and proc2 in place and they are bing used by other programs. what I am trying to do in proc3 is get a single value from these two procs combine them and return is as a single value to VFP.

>Here's basic code that shows how it can be done.
CREATE TABLE #temp1 (msg1 varchar(50) NULL)
>CREATE TABLE #temp2 (msg2 varchar(50) NULL)
>INSERT INTO #temp1 EXEC proc1
>INSERT INTO #temp2 EXEC proc2
>SELECT * FROM #temp1 CROSS JOIN #temp2
>DROP TABLE #temp1
>DROP TABLE #temp2
>
>>I have two stored procedures that return 1 field each.
>>It is being used by other programs.
>>We can not modify these procedures.
>>I’m trying to combine the return values from these two procedures and return a single table back to VFP.
>>Also I do not want the result of the 1st two procedures returned to VFP.
>>Can you help?
>>Here is a SQL example:
>>
>>Create Procedure Proc1
>>as
>>select 'FromProc1' as Message
>>go
>>
>>Create Procedure Proc2
>>as
>>select 'FromProc2' as Message
>>go
>>
>>declare
>>	@RetVal1	varchar(50),
>>	@RetVal2	varchar(50)
>>
>>exec @RetVal1 =  Proc1
>>exec @RetVal2 =  Proc2
>>
>>select @RetVal1,@RetVal2
>>
>>go
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform