MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 28th, 2004, 10:15 AM
sardinka sardinka is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 95 sardinka New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: 9 h 8 m 12 sec
Reputation Power: 0
sqlstring

I have a sp where I am creating a 2 SQL String.
When I am executing the sp if first string return '0' I exec 2 string.
In my resultset I am getting to sets from string1 and string2. What do I need to do in order to get only 1 dataset back if I execute second string?
example:
...
EXEC sp_executesql @SQLString1
...
-- if exact match is not found
if @@rowcount = 0...EXEC sp_executesql @SQLString2

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > sqlstring


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT