November 22, 2004 at 12:29 am
Our ERP accept only sql statments for reporting.(I can write select ... but I can not Write Exec Store_Procedure) .
I Want to execute a Store Procedure in a select statment.
November 22, 2004 at 1:21 am
No chance! That syntax is simply not supported.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
November 22, 2004 at 5:15 am
You cannot EXEC stored-procedures HOWEVER you can have user-defined functions in-line. You may want to research UDFs and see if they can accomplush your desired results.
Good Hunting!
AJ Ahrens
webmaster@kritter.net
November 23, 2004 at 10:56 am
You have at least two options if you need to use the resultset from the stored procedure.
1) You can use the stored procedure to insert the results into a temporary table (e.g., INSERT tablename EXECUTE proc)
2) OPENROWSET.
RandyHelpdesk: Perhaps Im not the only one that does not know what you are doing. 😉
November 23, 2004 at 11:12 am
However, if your login does not have execute permissions to a stored procedure, then syntax tricks will not help. "Extra" access is not granted based on the T-SQL in the ad-hoc select. This applies to udfs also.
RandyHelpdesk: Perhaps Im not the only one that does not know what you are doing. 😉
November 23, 2004 at 11:46 pm
Thank You!!!!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply