dbTalk Databases Forums  

CLOBs in Triggers - assigning to :new.XXXX

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss CLOBs in Triggers - assigning to :new.XXXX in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
whitegoose@inorbit.com
 
Posts: n/a

Default CLOBs in Triggers - assigning to :new.XXXX - 05-19-2005 , 12:24 AM






I have searched high and low for an answer to this, can anyone help?

I am writing a BEFORE INSERT trigger on a table with a calumn called
COMMENTS which is of type CLOB. I need to assign a value (another CLOB
from a different table) to :new.COMMNETS - but I understand this is a
problem in Oracle 8.

There must be a way to do this. I am aware of DMBS_LOG but I can't
manage to get it working.

Does anyone have a solution?


Reply With Quote
  #2  
Old   
Rauf Sarwar
 
Posts: n/a

Default Re: CLOBs in Triggers - assigning to :new.XXXX - 05-19-2005 , 06:04 AM







whitegoose (AT) inorbit (DOT) com wrote:
Quote:
I have searched high and low for an answer to this, can anyone help?

I am writing a BEFORE INSERT trigger on a table with a calumn called
COMMENTS which is of type CLOB. I need to assign a value (another
CLOB
from a different table) to :new.COMMNETS - but I understand this is a
problem in Oracle 8.

There must be a way to do this. I am aware of DMBS_LOG but I can't
manage to get it working.

Does anyone have a solution?
1) Your Oracle version?
2) What is the problem in Oracle 8? Please be more specific and provide
an error message.
3) There isn't a dbms_log object. Do you mean dbms_logmnr package?

Regards
/Rauf



Reply With Quote
  #3  
Old   
DA Morgan
 
Posts: n/a

Default Re: CLOBs in Triggers - assigning to :new.XXXX - 05-21-2005 , 01:50 AM



whitegoose (AT) inorbit (DOT) com wrote:
Quote:
I have searched high and low for an answer to this, can anyone help?

I am writing a BEFORE INSERT trigger on a table with a calumn called
COMMENTS which is of type CLOB. I need to assign a value (another CLOB
from a different table) to :new.COMMNETS - but I understand this is a
problem in Oracle 8.

There must be a way to do this. I am aware of DMBS_LOG but I can't
manage to get it working.

Does anyone have a solution?
What version
What problem
What DDL
What DML
What does DBMS_LOG, which doesn't exist, have to do with anything?

PS: No column should ever be named COMMENTS. If it is, for example,
the person table, name the column PERSON_COMMENTS.
--
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)


Reply With Quote
  #4  
Old   
whitegoose@inorbit.com
 
Posts: n/a

Default Re: CLOBs in Triggers - assigning to :new.XXXX - 05-25-2005 , 12:02 AM



The Version is 8.1.7

The problem is that Oracle 8 does not allow :NEW.XXXX to be updated
from a trigger where XXXX is a CLOB field.

My apologies, it was a typo - I meand DBMS_LOB - a package used for
mainpulating LOBs and CLOBs.

I can't provide DML and DDL because I'm not after a solution to a
specific problem, I just wanted to know if anyone had a solution for
updating CLOB fields from a trigger on the same table. (eg. Yes you can
do it - use DBMS_LOB.WRITE to update the field)

I do not have a choice about the name of the COMMENTS field.

Thanks,
Josh.


Reply With Quote
  #5  
Old   
DA Morgan
 
Posts: n/a

Default Re: CLOBs in Triggers - assigning to :new.XXXX - 05-25-2005 , 12:11 AM



whitegoose (AT) inorbit (DOT) com wrote:
Quote:
The Version is 8.1.7

The problem is that Oracle 8 does not allow :NEW.XXXX to be updated
from a trigger where XXXX is a CLOB field.

My apologies, it was a typo - I meand DBMS_LOB - a package used for
mainpulating LOBs and CLOBs.

I can't provide DML and DDL because I'm not after a solution to a
specific problem, I just wanted to know if anyone had a solution for
updating CLOB fields from a trigger on the same table. (eg. Yes you can
do it - use DBMS_LOB.WRITE to update the field)

I do not have a choice about the name of the COMMENTS field.

Thanks,
Josh.
Which means it is really important to have a version of Oracle
that supports LOBs.
--
Daniel A. Morgan
Relational theory is not something that is simply a nice-to-have.
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.