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

Cognos and Impromptu Query Help

Status
Not open for further replies.

simdan42

Programmer
Jul 17, 2002
118
US
I have the Query -
Report Date between 2004-02-29 and 2004-03-03
and Location contains 'RIVERWOOD'

This works great but what I want to go is to use a simple query to search multiple Locations (i.e. 'RIVERWOOD' & 'ROSWELL' & 'AIKEN' etc etc) Please Help
 
enclose your different filters in brackets i.e.

(Report Date between 2004-02-29 and 2004-03-03)
and (Location contains 'RIVERWOOD' or Location Contains 'ROSWELL' or Location contains 'AIKEN')

HTH

Gary Parker
Systems Support Analyst
Manchester, England
 
You could go the route Gary suggests, but watch out for the performance hit. Both the contains clause and the OR clause will usually degrade performance. Using both of them will cause significant slowdown if there is a lot of data present. A better alternative might be to present the user with a multi-select listbox prompt using the IN clause. This allows for multiple location searching, but is much more efficient, especially if the location is indexed. Obviously this will not work if you want to select all locations with a common text component, i.e. 'ville' in 'Smallville', 'Roseville', etc.

Regards,

Dave Griffin



The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ401-2487 first!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top