Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Stored Procedures result?

Author  Topic 

taunt
Posting Yak Master

128 Posts

Posted - 2011-06-08 : 17:53:53
Hello, stupid question where does SQL 2005 store the results of a stored procedure? I've select result to text, grid and file and get nothing. It stores a xml of the result, but where? Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-06-08 : 17:57:54
If the stored procedure has output (not all do), then it will display in your client tool. If you don't see output in SSMS, then what does the stored procedure code do?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

taunt
Posting Yak Master

128 Posts

Posted - 2011-06-08 : 18:24:38
Well it looks like this:
USE database;
GO
IF NOT EXISTS(SELECT field FROM table
WHERE (zzz = 'zzz') or
(aaa = 'aaa') or
(ccc = 'ccc') or
(ddd = 'ddd') or
(eee = 'eee') or
)
BEGIN
SELECT 'not found'
END

I Need it to show me what results it can't find from our database.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-06-08 : 18:29:02
The stored procedure isn't designed to show you anything. If you want it to display data, then please explain what you want it to show so we may help you with the code.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

taunt
Posting Yak Master

128 Posts

Posted - 2011-06-09 : 12:11:57
I need it to display the result it can't find in our database. For instance sku aa1, aa2, aa3. I need it to tell me that aa3 isn't in the database.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-06-09 : 12:20:08
I'm so confused. If something isn't in the database, then how is it going to know what to display?

Perhaps you should show us a complete data example to make this clear.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -