database - Select part of a string from a object type column SQL -


Soon I'm getting a SQL error: ORA-00932: Incompatible datatype: Expected number oi CUST_ADDRESS_TYP 00 9 32. 00000 - "Incompatible datatype: expected% s got% s" when I'm trying to retrieve a part of a string data.

  SELECT dbms_lob.SUBSTR (cus.cust_address, 0, INSTR (cus.cust_address), ',') - 1) As output from oe.customers;  

So basically this is my statement.

The data looks like: OE.CUST_ADDRESS_TYP ('322E Michigan St.', '53202', 'Milwaukee', 'WI', 'US')

Who want Milwaukee to be in this case.

However, type the address_type of the cust_address column that is set to CUST_ADDRESS_TYP, which is one type of address address.

I just want to select the part of a string for example, I only oi CUST_ADDRESS_TYP ( '322 wants to select Milwaukee E Michigan Street', '53202', 'New York I

CUST_ADDRESS CUST_ADDRESS_TYP Yes 4 Object column type address_typ. As shown in

This table is.

really makes me turret because the statement works considered types of columns, but this is not.

kind regards,

PS object type Fixed it using columns, did not use Rich Theo. Oracle Documenter See the meaning of the request object type o:

P>

  SQL & gt; type comp_type object (2 x varchar2 (10) 3, y varchar2 (10) 4) 5 / SQL & gt; table T (Carr comp_type) 2 / SQL & gt; t insert values ​​(comp_type ( 'a ',' B ')) 2 / SQL & gt; made 2 / SQL & gt; curl as select treatment (comp_type) .x, curl treat (comp_type). T2 / trait (Cola trait (COLA ---------- ---------- AB  

Comments