Hello,
I have a stored procedure: SP_SPLIT
Input: Input_Word varchar(1000)
Output: Select * from #temp_table
which returns a temporary table with 2 columns:
#temp_table--------------
-------------------------
Word-----------Varchar(80)
Value----------Float
I need to retrieve this query in a Main procedure. Can any one tell me the SYNTAX of how to pass a table by reference.
Here is what I am trying to achieve:
Call Flow Execution
1)Procedure Name: Sp_Main Input: input_word varchar(1000)
2)SP_Main calls SP_Split: #table_split=SP_SPLIT input_word
2a) SP_Split returns a table #temp_table
3) SP_Main creates a table:
Create Table #table_result {Word_ID (int), Value (float)}
4) SP_Main cursor loops for each row in #table_split
..do some work
Insert value(s) in #table_result
return Select * from #table_result
I require a code snippet for step #2 and step #2a
Thanks.
I have a stored procedure: SP_SPLIT
Input: Input_Word varchar(1000)
Output: Select * from #temp_table
which returns a temporary table with 2 columns:
#temp_table--------------
-------------------------
Word-----------Varchar(80)
Value----------Float
I need to retrieve this query in a Main procedure. Can any one tell me the SYNTAX of how to pass a table by reference.
Here is what I am trying to achieve:
Call Flow Execution
1)Procedure Name: Sp_Main Input: input_word varchar(1000)
2)SP_Main calls SP_Split: #table_split=SP_SPLIT input_word
2a) SP_Split returns a table #temp_table
3) SP_Main creates a table:
Create Table #table_result {Word_ID (int), Value (float)}
4) SP_Main cursor loops for each row in #table_split
..do some work
Insert value(s) in #table_result
return Select * from #table_result
I require a code snippet for step #2 and step #2a
Thanks.