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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure.. Newbie Question

Status
Not open for further replies.

kev510

Programmer
Jul 12, 2006
61
Hi everybody. I am not sure if I'm even posting in the right forum... I tried my best.

I need to write a stored procedure that'll work with two values, @FromValue and @ToValue.

In Query Analyzer, when this stored procedure is executed with user-given values (@FromValue/@ToValue), I need it to loop until the program reaches the ToValue number.

Lets say I executed the SP with given values @FromValue = 1 and @ToValue = 5, the result should be

1, 2, 3, 4, 5

Listing out all numbers 1 to 5, with a comma and space after each number.

Thank you for taking your time to help me.

-Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top