April 14, 2009 at 1:00 am
Hi
I have a proc which will take some paameters and returns a scalar value i want that result as the data for a column in a select query.
Example : My Procedure Will Return 'Raghu'
In the select statement for name column i want that result to come.
Please tell me it is very urgent
Thanks in Advance.
/********************************************************
Technology is just a tool,in terms of getting the kids working together and motivating them,the teacher is the most important.
********************************************************/
April 14, 2009 at 1:25 am
Sorry, I'm not following you. Could you maybe show the procedure and explain a bit more what it currently returns and what you want it to return?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 14, 2009 at 1:46 am
I have a SP which will accept ID and CultureID depending on there two things it will give me a scalar value that is "Name"
Now the above proc is working fine, the prob is i want to call that proc in a selec statement
like
select ID,(exec Proc ID) as Name from Table
I dont know how to do this but i want like this ...
/********************************************************
Technology is just a tool,in terms of getting the kids working together and motivating them,the teacher is the most important.
********************************************************/
April 14, 2009 at 1:47 am
I have a SP which will accept ID and CultureID depending on there two things it will give me a scalar value that is "Name"
Now the above proc is working fine, the prob is i want to call that proc in a selec statement
like
select ID,(exec Proc ID) as Name from Table
I dont know how to do this but i want like this ...
/********************************************************
Technology is just a tool,in terms of getting the kids working together and motivating them,the teacher is the most important.
********************************************************/
April 14, 2009 at 2:09 am
grngarlapati (4/14/2009)
Now the above proc is working fine, the prob is i want to call that proc in a selec statementlike
select ID,(exec Proc ID) as Name from Table
I dont know how to do this but i want like this ...
You can't call a procedure as part of a select statement.
How does it return name? It can't be as a return value, that has to be int.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply