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!

SQL prompt for MULTI use not working

Status
Not open for further replies.

smooveb

IS-IT--Management
Jul 20, 2001
161
US
Hi guys,

I'm working with the following SQL. I'm a beginner, most definitely. Everything works quite well, but when I try to use multiple cost centers in my prompt (for cost center) no data is getting returned. The wildcard %, on the other hand, works fine. So one or all is working, but not anything else, whether delimited by commas, semi-colons, spaced, etc.

Any help will be most appreciated! Let me know what other information I might be able to provide to assist.



select
COST_CENTER cost_code,
EMPLOYEE_NO Emp_id,
' ' Employee_Number,
LAST_NAME,
FIRST_NAME,

from domino_corpdir_person

where
(LAST_MODIFIED> @variable('1. Enter Date (mm/dd/yyyy)') or @variable('1. Enter Date (mm/dd/yyyy)') = '%') and
(substr(cost_center,6,4) in @prompt('3. Enter Cost Center(s)',,,MULTI,) or @prompt('3. Enter Cost Center(s)',,,MULTI,) = '%')
 
What database are you using?

If you can, create a Veiw on the database, then Crystal will handle the multivale parameter code itself, or create a Stored Procedure and pass in a comma delimited string and then parse it in the SP if you need to pass multiple values.

-k
 
Hi,

I don't think that's an option. Is there no way to handle this using SQL?
 
What database are you using?

Note that most Stored Procedures do NOT allow for multiple parameters being passed, with exception to some string being parsed within the SP to accomplish this, this has NOTHING to do with Crystal.

-k
 
Hi K,

think I'm using Oracle 8.1.7. As well, using Business Objects version 5.1.3 for the report.

Thanks!
Barrett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top