Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CLOB to VARCHAR2
Message
From
04/01/2005 11:30:20
 
 
To
04/01/2005 11:07:37
General information
Forum:
Oracle
Category:
Troubleshooting
Miscellaneous
Thread ID:
00974097
Message ID:
00974107
Views:
37
Hi Mike,
This depends on your Oracle database version as well as the way you connect.
Might be easier if you provide: Oracle DB version and ODBC driver and if you are using SQL passthrough or what?

This info may help.
On 8i Conversion can be done with DBMS_LOB.SUBSTR(lobfield,1,255)

http://www.experts-exchange.com/Databases/Oracle/Q_20098510.html

On 9i COnversion is explicit you can still use DBMS_LOB if you want.

When Using microsoft odbc driver for oracle CLOBS dont work its not supported
so you may need to use something like "SELECT addr_no, cust_no, DBMS_LOB.SUBSTR(ADDR_LINE,1,255)"

When using oracle instant client's 10g driver CLOBS will return correctly as memo fields when using SQL passthrough.
http://www.oracle.com/technology/software/tech/oci/instantclient/index.html

HTH
Tim

On
>Is there a way in a query to convert data stored in a CLOB field into a Character field? In the following query the field 'ADDR_LINE' is the field I'd like to convert. If I could get only the 1st row of the field. That would be ok. Or the 1st 2 rows into 1 row, even better.
>
>
lcSqlStatement = "SELECT addr_no, cust_no, ADDR_LINE, city, " +;
>	         "state_cd, cntry_cd, zip_cd " +;
>                 "FROM addr_dtl " +;
>                 "WHERE addr_dtl.addr_no = " + TRANS(lnCustAddrNo)
>
>TIA
>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform