Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » MULTIPLE VALUE PASSING "IN" OPERATOR FROM "MULTISELECT LIST" (APEX 3.1.2, Oracle database 10g XE)
MULTIPLE VALUE PASSING "IN" OPERATOR FROM "MULTISELECT LIST" [message #389641] Tue, 03 March 2009 00:30 Go to next message
OraVision
Messages: 17
Registered: March 2008
Junior Member
DDL:
CREATE TABLE  "TB_IMPORTDT" 
   (	"AUTOID" NUMBER, 
	"POPULATION" VARCHAR2(6), 
	"DEATH" VARCHAR2(6), 
	"DISEASEID" NUMBER(4)
   )
/



DATA:
INSERT INTO TB_IMPORTDT VALUES(1,'394849','100',1)
/
INSERT INTO TB_IMPORTDT VALUES(2,'394849','100',2)
/
INSERT INTO TB_IMPORTDT VALUES(3,'394849','100',3)
/
INSERT INTO TB_IMPORTDT VALUES(4,'394849','100',3)
/
INSERT INTO TB_IMPORTDT VALUES(5,'394849','100',1)
/
INSERT INTO TB_IMPORTDT VALUES(6,'394849','100',2)
/
COMMIT;


DATA PREVIEW:
    AUTOID POPULA DEATH   DISEASEID                                             
---------- ------ ------ ----------                                             
         1 394849 100             1                                             
         2 394849 100             2                                             
         3 394849 100             3                                             
         4 394849 100             3                                             
         5 394849 100             1                                             
         6 394849 100             2                                             

6 rows selected.

PROBLEM:
MULTIPLE VALUE PASSING into "IN" operator from "MULTI SELECT LIST".

BELOW OUTPUT IS EXPECTED AND OK
SQL> SELECT * FROM TB_IMPORTDT WHERE DISEASEID IN ('1','2','3');

    AUTOID POPULA DEATH   DISEASEID                                             
---------- ------ ------ ----------                                             
         1 394849 100             1                                             
         2 394849 100             2                                             
         3 394849 100             3                                             
         4 394849 100             3                                             
         5 394849 100             1                                             
         6 394849 100             2                                             

6 rows selected.


BELOW CODE NOT WORKING:(not getting the output)
 SELECT * FROM TB_IMPORTDT WHERE DISEASEID IN (:P_DISEASELIST)


NOTE: Here "P_DISEASELIST" IS A "MULTI SELECT LIST" that returning value as 1:2:3 and before putting into IN parameter i am replacing ':' value to ',' as
Replace(:P_DISEASELIST,':',',')

--Thanks

[Updated on: Tue, 03 March 2009 00:37]

Report message to a moderator

Re: MULTIPLE VALUE PASSING "IN" OPERATOR FROM "MULTISELECT LIST" [message #389651 is a reply to message #389641] Tue, 03 March 2009 00:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Search for "varying in-list".

Regards
Michel
Re: MULTIPLE VALUE PASSING "IN" OPERATOR FROM "MULTISELECT LIST" [message #389725 is a reply to message #389641] Tue, 03 March 2009 06:59 Go to previous messageGo to next message
OraVision
Messages: 17
Registered: March 2008
Junior Member
Thank you very much.
Re: MULTIPLE VALUE PASSING "IN" OPERATOR FROM "MULTISELECT LIST" [message #389873 is a reply to message #389641] Tue, 03 March 2009 20:16 Go to previous message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
hi,

you can create type to array list. Example is available in this forum against sample script. hope this will suit to your needs
best of luck. If that does not work, let me know so that i will correct myself
yours
dr.s.raghunathan

ps : sorry i didn't see your message #389725

[Updated on: Tue, 03 March 2009 20:20]

Report message to a moderator

Previous Topic: How can Pass more variable in Column Link
Next Topic: How to set Application's URL
Goto Forum:
  


Current Time: Thu Mar 28 02:56:31 CDT 2024