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

SQL Command Parameter Prompt Order

Status
Not open for further replies.

danausten

IS-IT--Management
Dec 10, 2003
54
NL
Hi,

I have setup a number of reports that use SQL Commands. Each of these reports has a start date parameter and an end date parameter. When the reports are run some of them correctly prompt for 'Start Date' first then 'End Date'. But some reports prompt the other way round. I can't work out how to make the report prompt for the 'Start Date' first! In the parameter list the 'End Date' parameter is always the 1st parameter on all reports. And the command SQL has the 'start date' as the 1st part of the WHERE clause.

CR10
SQL Server 2000

Any ideas?

Dan Austen
 
Hi,
IIRC, parameters are prompted for in the order they were created , not when they are used in the where clause.
Try recreating the parameters being sure to create Start before End.

[profile]
 
Thanks for your reply.

Thats what I thought. I've removed the parameters and re-created them (even with different names) but still I'm prompted for the 'End Date' first!

 
However, if I change the 'End Date' parameter name to W_EndDate the order of the prompting is correct.
 
The parameters are prompted alphabetically so I changed mine to ?FromDate and ?ToDate
 
I have also changed my parameters to 'From Date' & 'To Date'. Although this doesn't explain why some reports don't prompt alphabeticaly....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top