Re: What is wrong with this? : select * from (exec sp_helpdb)

From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 05/29/04


Date: Fri, 28 May 2004 22:58:34 -0400

That's absurd. Do you want it to read your mind as well<g>..

-- 
Andrew J. Kelly
SQL Server MVP
"TomTom" <no_spam@nospamfordiscussion.com> wrote in message
news:%23h%23XVNSREHA.4016@TK2MSFTNGP12.phx.gbl...
> In your example below, it seems to me that the SQL server can be made
smart
> enough to know what the user's intension might be. If the stored procedure
> is used for updating the records, may be it should return 1 or something
to
> indicate that the update was successful. If the procedure was used to get
> the recordset, then that recordset should be returned. Anyway, I expected
> this kind of behavior.
>
>
> "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
> news:u6ixTQNREHA.2572@TK2MSFTNGP12.phx.gbl...
> > > Thank you, everyone. It looks like this is a limitation of SQL, with a
> lot
> > > of workaround.
> >
> > And some good reasons, too.  Stored procedures are not just used for
> > retrieving data.  I have many stored procedures that perform a simple
> update
> > or delete statement.  So if I say:
> >
> > SELECT * FROM (exec SomeUpdateProc)
> >
> > Should the engine try and figure out if I merely meant to execute the
> > statement?  And if so, should it execute it, even though it knows I
won't
> be
> > getting any results in my select?
> >
> > -- 
> > Aaron Bertrand
> > SQL Server MVP
> > http://www.aspfaq.com/
> >
> >
>
>


Relevant Pages

  • Re: Converting Application from ADP to ACCDB
    ... SELECT stored procedures are NEVER updatable. ... out how to talk to SQL Server from an Access 2007 ACCDB file. ... Either ADO or DAO, ... ADO or DAO recordset based on parameterized stored procedures). ...
    (microsoft.public.access.adp.sqlserver)
  • Extreme performance issues (SQL Server 2000/ADO.NET/C#)
    ... This process runs very quickly if run through Query ... same exact stored procedures and views, run in the same exact order, through ... system that runs SQL Server (a 4-cpu Xeons system with 2gigs of physical ... When I execute these steps manually through query analyser,, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: GRANT - Execute SP
    ... Jasper Smith (SQL Server MVP) ... existing stored procedures, so when you create a new procedure, it will have ...
    (microsoft.public.sqlserver.security)
  • Re: Querying on dates in dd/mm/yyyy hh/mm/ss format using Access2002 And SQL Server 7
    ... For parsing a string to a date/time, the 103 format doesn't limits the user ... > which is used as the row source for the results form). ... > other solutions assuming I have to use SQL Server 7? ... > I don't understand how I can use parameterized stored procedures to solve ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Help understanding Stored proc Level Secuirty?
    ... Jasper Smith (SQL Server MVP) ... I set permissions to my Stored Procedures, ... Access to stored procs fail ...
    (microsoft.public.sqlserver.security)