Actually, my question about replacing special characters (thanks to all
who answered, by the way) was part of a larger question.  What I really
need to do is select all rows of one table, modify the value of one
field, and insert all of the rows, with that one modified field, into
another table.

Here is the code I've written as an attempt:

<cfset sourceTable="tblMessage">
<cfset targetTable="tblMessageNew">

<cfquery name="get" datasource="DLCampus">
select * from tblMessage
</cfquery>

<p><b>All rows selected.  Processing...</b></p>

<cfquery name="put" datasource="DLCampus">
<cfoutput query="get">

<cfset newMessage = replace(#get.msgMessage#,chr(13)&chr(10),"<BR>")>

insert into tblMessageNew (msgID, msgSent, msgFromType, msgFromID,
msgSubject, msgMessage, msgOriginal, attID)
values
#get.msgID#, '#get.msgSent#', #get.msgFromType#, #get.msgFromID#,
'#get.msgSubject#', '#get.msgMessage#', #get.msgOriginal#, #get.attID#

</cfoutput>
</cfquery>

Unfortunately, it doesn't seem to be quite working.  No errors are
returned; when I try to run the code, I get a "500 Null" error, which is
astonishingly uninformative.  ;-)

--
Richard S. Crawford
Programmer III,
UC Davis Extension Distance Learning Group (http://unexdlc.ucdavis.edu)
(916)327-7793 / [EMAIL PROTECTED]
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to