Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi guys,

 

I am using ADO.NET and MSSQL 2000.

 

In a SP if you issue multiple "Select" statements, it will return multiple datatables. But now I just want the last result set. How can I tell MSSQL to only give me the last one? I don't want to waste bandwidth to get back the extra ones.

 

Thanks in advance.

 

Michael

There is no spoon. <<The Matrix>>
Posted
You'd have to modify the stored procedure with conditional statements. There's no direct way to filter a query result set.

 

Thanks for the info.

 

Now I got another question. Say I have a complex Select query (may return 0 record) involving joining more than 10 tables, is it better to first use IF EXISTS () to test before doing the real Select?

There is no spoon. <<The Matrix>>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...