Link to home
Start Free TrialLog in
Avatar of Webbo_1980
Webbo_1980

asked on

How do i Return a value from a stored procedure in the select statement of another query

Lets say for example that i have the following command

select column1, column2,column3, (select count(*) from tableb) as column4
from tablea

Now lets say that my real query was far larger, and far more complex and i wanted to place column4 as a stored procedure or function.

Is this possible? and are there any drawbacks?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial