Advertisement

08.29.2005 at 10:03AM PDT, ID: 21543688
[x]
Attachment Details

Call a stored procedure from select

Asked by JessyEzzy in MS SQL Server

Tags: select, stored, procedure, from, call

Is it possible to call a stored procedure in a select statement

For example

SELECT Account_ID, Account_Number, Currency, (Exexute the stored procedure passing to it the Account_ID) AS Current_Amount FROM Accounts

I need to call this stored procedure that takes an Account ID and performs certain calculations and return an Amount, I want this Amount to be a column in the returned result of the Select Statement

How can I do something like this?Start Free Trial
[+][-]08.29.2005 at 10:05AM PDT, ID: 14777352

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.29.2005 at 10:08AM PDT, ID: 14777377

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.29.2005 at 10:14AM PDT, ID: 14777426

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.29.2005 at 10:15AM PDT, ID: 14777435

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: select, stored, procedure, from, call
Sign Up Now!
Solution Provided By: paelo
Participating Experts: 3
Solution Grade: A
 
 
[+][-]08.29.2005 at 10:52AM PDT, ID: 14777745

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32