update oracle column but bot replace

Reply

Join Date: Oct 2005
Posts: 8
Reputation: jamba is an unknown quantity at this point 
Solved Threads: 1
jamba jamba is offline Offline
Newbie Poster

update oracle column but bot replace

 
0
  #1
Oct 7th, 2005
Hi Folks!
Wonder if you can help??
I need to know a way of updating a column in Oracle (datatype: long) but keep the existing data so like an append. Am using Coldfusion to write to Oracle and I know that you can only write 4000 chars at a time, but not sure how you add to what's already there without having to break the 4000 char limit...

Hope this makes sense?!?
:o

Jam
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 8
Reputation: jamba is an unknown quantity at this point 
Solved Threads: 1
jamba jamba is offline Offline
Newbie Poster

Re: update oracle column but bot replace

 
0
  #2
Oct 17th, 2005
OK - I figured it out. You cannot perform a where/like query on an ORACLE long datatype as it expects an integer. I changed the datatype to a CLOB and then retrieved the field into a temp var. I then added the user input to the temp var and finally updated the record by use of cfqueryparam:

UPDATE theTable SET theColumn = <cfqueryparam value="#tempVar#" cfsqltype="CF_SQL_LONGVARCHAR"> WHERE theTableID = theTableIDValue

..equally I can now perform a search on the CLOB datatype:

SELECT theColumn FROM theTable WHERE theColumn LIKE <cfqueryparam value="%#tempVar#%" cfsqltype="CF_SQL_LONGVARCHAR">

I award myself 100 bonus points...

Jam
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 9084 | Replies: 1
Thread Tools Search this Thread



Tag cloud for ColdFusion
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC