Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I execute a stored procedure without getting a result?

Status
Not open for further replies.

galore

Programmer
Aug 14, 2003
2
SE
I am trying to do something like this inside a stored procedure:

EXEC searchEvent 'Exhibition'
IF @@ROWCOUNT > 0
BEGIN
SELECT 'EXHIBITION'
END

The problem is that searchEvent returns a record set. This way i got two record set. How can I do the test if searchEvent returns anything without displaying it?

Regards
Galore

 
Hi pgtek!
I dont understand how this can help me.
Can you explain it further please?

Regards
Galore
 
Hi!
If you procedure searchEvent return single recordset you could declare temp table and store result into it.
DECLARE #t (...)
INSERT INTO #t(COLUMN NAMES) EXEC searchEvent '...'

But signifficatly easy from my point of view declare out parameter and return in from SP (such sollution also applicable for multiple recordset SPs).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top