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

Feeding a Parameter into an ADO SQL script

Status
Not open for further replies.

rier

Technical User
Sep 13, 2000
27
GB
Can anyone help?

I have an ADO connection and the beginning of the SQL is as follows...


declare @fromdate as datetime
declare @todate as datetime
set @fromdate = 'Jan 01 2002 00:00:00AM'
set @todate = 'Jan 30 2002 00:00:00AM'
SELECT
count(*) as groupcount, CustomerGroup.ID, CustomerGroup.GroupName, CustomerGroup.T........., etc


What I want to do is to set up a range parameter which will set the @fromdate and @todate.

Does anyone know how I would approach this prob?

Thanks

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top