Link to home
Start Free TrialLog in
Avatar of flwebster
flwebster

asked on

DRW Query criteria statements

Hi,
I have a database with a field with 6 drop down tournaments as follows:

Grades 6,7 & 8 Girls
Grades 5-6 Boys
Grades 7-8 Boys
Junior Varsity Boys
Junior Varsity Girls
High School Girls
Varsity Boys

I'm trying to use DRW to create an ASP file that will allow users to get a list of teams entered by groups as above, but no matter how I enter the criteria statement in the DRW it comes back with no entries where I know they exist, an error about incorrect characters (, etc),

I'm trying to enter where field = tourney.. and these are the values above.

How do I do this???

Avatar of flwebster
flwebster

ASKER

Sorry, fp2003
ASKER CERTIFIED SOLUTION
Avatar of rcmb
rcmb

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
name of drop down field is tourney

Choices are
Grades 7-8 Boys
Junior Varsity Boys
Varsity Boys
Grades 6,7 & 8 Girls  (or Grades 6,7 & 8 Girls)
Junior Varsity Girls
Varsity Girls

I'm not sure how the Grades 6... choice is actually written.

What I'm tryingt to do is to create a page ASP report page that shows the teams entered in each tournament. So, for instance, the Varsity Girls page would show only the varsity girls teams, the Grades 7-8 Boys page would show only those teams and so on..

Thanks,

Marty
What you are going to need to do is in your query do something like

SELECT * From TableName WHERE AgeGroup LIKE '::Tourney::%'
(note: AgeGroup would be your database field that contains the age groups you identified in your drop down.)

This should give you what you are looking for.

There may be a problem with the way the information is stored. When you put commas and & symbols sometimes the SQL query tries to read them as part of the statment. Is there anyway you can change the data to read something like:

Grades 7-8 Boys
Junior Varsity Boys
Varsity Boys
Grades 6-8 Girls
Junior Varsity Girls
Varsity Girls

This would help any issues with the query and the above example I gave you would work fine.

RCMB
thank you for the quick and precise solution.
Glad we got it fixed for you.

Have a great evening.

RCMB