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!

Parameters >> SQL Stored Procedure I Know this is Easy!

Status
Not open for further replies.

Ramjet

Programmer
Nov 1, 2000
21
US
I have an TSQL statement built that executes perfectly.
I have a CR8 Report that takes the results of the TSQL
and displays perfectly. Now I want to add the ability to
select records between two dates. If I hardcode the dates into the TSQL statement it works. What I need to know is


HOW can I get the dates selected from CR8 into my stored procedure variables???


TIA
 
Modify your sp so that it has two input parameters, @FromDate and @ToDate.
Filter your sp select statement based on the parameters:
... SomeDate BETWEEN @FromDate AND @ToDate
Verify the "database" for the report based on this sp.
You will be prompted to enter dates for the sp, and the sp will return just the records that fit through your sp filter.
Malcolm
 
You are absolutely correct(Of Course) that is what happens but!! This process originates from a web page so what I am ultimately trying to do is get the dates from the web page
to CR8 Then to SP. Problem is I can't have message boxs popping up on server for input dates. But otherwise I do have my input date and BETWEEN in TSQL ready and waiting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top