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!

Stored procedure

Status
Not open for further replies.

dougancil

IS-IT--Management
Mar 31, 2009
44
US
Everyone,

I'm trying to run a stored procedure to give me more than a single result using the following line:

SELECT TOP 1 @FirstListing = FirstListing, @Comment = Comment, @oc_start = oc_start, @oc_end = oc_end

Granted there is much more to the stored procedure than this but this is a snip of it. What I want to do is to produce more than a single result to show on a web page. Currently I'm only getting one result being presented. I am more than willing to display the rest of the code if anyone may be able to help.

Thanks
 
Borislav,

According to how I see this script written, if I dont have data in a field for no_oc_value, then its supposted to return 'No o/c listed' so theorhetically, if I use arcim as the schedule I'm testing, I should not get nothing back but a 'No o/c listed' returned to me (see line 4 of the SP)
 
Nope,
The SP is written to gave you exact matches of the SchedName.
You have WHERE clause

WHERE SchedName = @subschedule

That filter records only for that SchedName.

You will have 'No o/c listed' only if you have some records that matches @subschedule you passed and FirstListing field contains NULL.

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top