Re: What is wrong with this? : select * from (exec sp_helpdb)
From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 05/29/04
- Next message: gordy: "Re: Index optimizing"
- Previous message: oj: "Re: Extracting BLOBs and drawing on vb.net form?"
- In reply to: TomTom: "Re: What is wrong with this? : select * from (exec sp_helpdb)"
- Messages sorted by: [ date ] [ thread ]
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/ > > > > > >
- Next message: gordy: "Re: Index optimizing"
- Previous message: oj: "Re: Extracting BLOBs and drawing on vb.net form?"
- In reply to: TomTom: "Re: What is wrong with this? : select * from (exec sp_helpdb)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|