Link to home
Start Free TrialLog in
Avatar of javaq092999
javaq092999

asked on

CLOB size, Trigger, <PRE>

Q1. CLOB allows 4GB of char data. I created a table like "CREATE TABLE aclob (id number, text clob)". When I do the "desc" on this table it shows me text as CLOB(4000). I tried to enter the data more than 4000 chars and the Oracle gives me the error "ORA-01704: string literal too long". Does that means by default the CLOB allows 4000 max chars. Do I need to create the table something like "CREATE table aclob (id number, text clob(20000)" so that it accept 20000 max chars. I am using Oracle 8.1.5 (with JDBC2.0 API) and Java/JDBC.

Q2. When I do not have any text to enter in my CLOB field I am entering NULL in it. It works fine. But then I came across this method named "empty_clob()". One can use this to insert instead of null. What this method is for. Do we need to use this method *preferably* instead of null in case there are no chars to be inserted in the CLOB field. Any advantages!

Q3. What is the basic difference between Before and After trigger. I think the difference lies only in that in after trigger you cannot set the values of the fields going in the table on which this trigger is fired!

Q4. <PRE>...</PRE> causes a new empty line to be added at its end. How to stop this new emty line to be added.

Regards
ASKER CERTIFIED SOLUTION
Avatar of UsamaMunir
UsamaMunir

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Guy Hengel [angelIII / a3]
just a friendly reminder...
Avatar of javaq092999
javaq092999

ASKER

I am using CLOB successfully but with an Upgrade issue with my old database. Initially I used VARCHAR2(2000) to store string data. Later I moved to CLOB instead of VARCHAR2. I moved all the old data into new tables (with CLOB columns) using "INSERT INTO NEW_TABLE AS (SELECT * FROM OLD_TABLE);" All the data comes fine and the data from VARCHAR2 also comes fine into CLOB but on comparision it gives that both are different. Is the above INSERT statement is OK to use for such conversion...
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
https://www.experts-exchange.com/questions/Q.20023290.html
https://www.experts-exchange.com/questions/Q.20121869.html
https://www.experts-exchange.com/questions/Q.20126064.html
https://www.experts-exchange.com/questions/Q.20139990.html
https://www.experts-exchange.com/questions/Q.20143257.html
https://www.experts-exchange.com/questions/Q.20148988.html
https://www.experts-exchange.com/questions/Q.20150711.html
https://www.experts-exchange.com/questions/Q.20158263.html
https://www.experts-exchange.com/questions/Q.20163902.html
https://www.experts-exchange.com/questions/Q.20163903.html
https://www.experts-exchange.com/questions/Q.20181528.html
https://www.experts-exchange.com/questions/Q.20245208.html
https://www.experts-exchange.com/questions/Q.20245590.html
https://www.experts-exchange.com/questions/Q.20251382.html
https://www.experts-exchange.com/questions/Q.20253111.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
https://www.experts-exchange.com/questions/Q.20143170.html
https://www.experts-exchange.com/questions/Q.20143993.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
Thank you for returning and finalizing this question.

Please take an extra moment when you grade questions less than an "A" to comment as to why.  This helps not only the experts who have helped you, but also others in the future who may access this question to get help.  If you've found alternative solutions to achieve your goal and add it here, it further adds value to this item which has not moved to our PAQ (Previously Asked Question database).  Anytime that you need our help, for example, if the grade was chosen in error, let us know by posting a zero point question in the Community Support with the URL to the question involved, we're happy to help.

Thanks,
Moondancer - EE Moderator