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

multiple values for single param (syntax issue)

Status
Not open for further replies.

ajacode

Technical User
Aug 21, 2002
66
US
Using Oracle 8.17 and a Dot.Net web Interface,

we use a selection list box as a multiple choice option and it returns event ID's such as

453, 563

in a controlled string format with comma seperated values.

The inbound parameter is :

P_EVENT IN VARCHAR2 DEFAULT 'ALL'

we ar attempting to pass multiple values to the variable or possibly 'ALL'

the SQL works with 'All' or a SINGLE Event ID but when multiple items are clicked, nothing returns.

We are using the IN statement because it seemed a natural to pass multiple comma delimed variables which are being passed as a string to the p_event variable to use in the IN statment.

Here is the IN Statement
AND (to_char(e.tixeventid) IN (P_EVENT) OR P_EVENT = 'ALL')


it actually worked when I hard coded the In statement AS:


AND (to_char(e.tixeventid) IN ('354','543') OR P_EVENT = 'ALL')

Anyone have any Ideas ??
 
Perhaps you could use an "instr" to interrogate P_EVENT for the presence of e.tixeventid.

Code:
select * from Life where Brain is not null
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
When posting code, please use TGML to help readability. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top