cancel
Showing results for 
Search instead for 
Did you mean: 

String Field in Oracle

former_member187444
Participant
0 Kudos

Hello Friends;

I want to keep in over 1000 characters in oracle. But if i open dictionary perspective and i select string field it says me

this would be possible length <=1000

Thanks in advace

Best Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U can use clob datatype to keep more than 1000 characters in oracle string field.

If answer is helpfull, please reward with points.

Thanks

ritu

former_member187444
Participant
0 Kudos

Hi Ritushree;

I try to use CLOB but if i run this statement

<b>oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(conn,false,oracle.sql.CLOB.DURATION_CALL);</b>

i got this error:

<b>com/sap/engine/services/dbpool/cci/CommonConnectionHandle incompatible with oracle/jdbc/OracleConnection </b>

I ve spent whole day to it, i didnt find solution.

Thanks in advance

Former Member
0 Kudos

yes..with usage of CLOB , you are bound to get this error at the point where you call createTemporary.

This is a flaw with the implementation of the CLOB class by oracle and the only alternative is to make use of SAP WebAS specific classes...

but...no luck...folllwing thread opened by me is still unanswered...may be you can try raising an OSS note

https://forums.sdn.sap.com/click.jspa?searchID=3655172&messageID=3145948

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Eray,

Oracle supports a LONGVARCHAR type. Why not use it?

former_member187444
Participant
0 Kudos

Hi Lou;

I cannot see LONGVARCHAR type in dictionary perspective.

How can i create it?

Thanks

dhawal_joshi
Employee
Employee
0 Kudos

Hi ,

Dictionary does allow creating a new simple type , but is either dervied out of other existing simple types or derived out of native types . It does not allow any user to create a new simple type and define its corresponding mapping at runtime . Thus i doubt if you create one it would solve your problem . Also as LONGVARCHAR is not directly avaialble you have to use it closest match .

regards

Dhawal

former_member187444
Participant
0 Kudos

Hi Dhawal, can you explain your solution please explain your solution...

<b>And I wonder that, there are so many java programmers in here,right?

Doesnt anyone use 2000 characters in a field and after that dont use search query like where clause..</b>

Please help in asap.

Thanks in advance

Best Regards

former_member182372
Active Contributor
0 Kudos

Eray, use binary instead.

former_member187444
Participant
0 Kudos

Hi, thanks for your reply..

If i use binary and write length as 2000, it gives me <b>LONGVARBINARY</b>

And i see there is a warning that

<b>where conditions cannot be used</b>

I remember it. Because if i do string field as 2000 length, i cannot use this sql statement.

<b>select * from mytable where myfield like '"%key%"'</b>

I think i could explain my problem. Exactly that is

i want to use 2000 characters in database and i want to use where and like clause in jsp.

Thanks in advance

Best Regards