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,) = '%')
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,) = '%')