Re: [cx-oracle-users] Oracle Error :: ORA-01484 arrays can only be bound to PL/SQL statements
Brought to you by:
atuining
From: Wong W. Meng-R. <r3...@fr...> - 2011-11-30 12:39:46
|
My application also has another usage of passing list items as parameters though the column STEP_NAME is not meant to store data as list item. >> cmd = "select ........ from FUTURE_HOLD_CONDITIONS where STEP_NAME not in (:1) and LOT_ID = :2 and ......." >> arg = (['HIGH TEST-DTS'], 'XXXXX',.....) >> execute(cmd, arg) >> "<type 'exceptions.ValueError'>", 'ORA-01484: arrays can only be bound to PL/SQL statements\n') Regards, Wah Meng ________________________________ From: Wong Wah Meng-R32813 Sent: Wednesday, November 30, 2011 8:27 PM To: 'cx-...@li...' Subject: RE: [cx-oracle-users] Oracle Error :: ORA-01484 arrays can only be bound to PL/SQL statements The field is a VARCHAR2 column. SQL> desc MES_ATTRIBUTE_HISTORIES; Name Null? Type ----------------------------------------- -------- ---------------------------- ENTITY_TYPE VARCHAR2(4) ENTITY_ID VARCHAR2(100) ATTR_NAME VARCHAR2(32) SET_TIME DATE SET_USER_ID VARCHAR2(32) ATTR_VALUE VARCHAR2(2000) COMMENTS VARCHAR2(255) RCDE_ID VARCHAR2(8) The data we store can be either an empty list, or some values. SQL> Select attr_value from mes_attribute_histories where entity_type='ALOT' and attr_name='wipRack'; ........ ........ ........ ....... KTMTEST:KT06 [] [] KTMPQCIL:KPQ03 [] KTMQA:KQ01 [] [] [] [] KTMTEST:KT06 [] [] KTMPQCIL:KPQ03 [] KTMQA:KQ02 [] KTMQA:KQ01 [] [] [] [] [] TSGTEST:359 [] [] [] [] [] [] ^C [] 8885 rows selected. Regards, Wah Meng ________________________________ From: Amaury Forgeot d'Arc [mailto:ama...@gm...] Sent: Wednesday, November 30, 2011 7:29 PM To: cx-...@li... Subject: Re: [cx-oracle-users] Oracle Error :: ORA-01484 arrays can only be bound to PL/SQL statements 2011/11/30 Wong Wah Meng-R32813 <r3...@fr...<mailto:r3...@fr...>> By design of the applicaiton, the ATTR_VALUE column can store value in python list format. But how is it stored in the database? "python list format" is not close to any valid SQL column type. -- Amaury Forgeot d'Arc |