I am having trouble with the UPDATE SQL query. What I am trying to do is to update descriptions in table A (which is the display table) and make it the same as the descriptions in table B (which is the database table).
So, I created this query to give me the results of which descriptions are different:
<CFQUERY NAME="Test1" DATASOURCE="etcetra" DBTYPE="Oracle80">
SELECT FN.TC_WORK_ORDER.Description
FROM FN.TC_WORK_ORDER, FN.TC_WO_DSP
WHERE FN.TC_WO_DSP.WO = FN.TC_WORK_ORDER.WO
AND FN.TC_WO_DSP.Description <> FN.TC_WORK_ORDER.Description
</CFQUERY>
This simply give me all the descriptions from the database table which are different (using #Test1.Description# in CFOUTPUT tags). However, what I want to do is actually update the display table (again, table A) when the database table (table b) is changed.
Whenever I try a Update query, it works fine if only one description has changed. If more than one changes, I get an error.
Here is my second query. Any ideas on how to fix this so that it will accomodate mulitple changes, instead of only one? Any help is much appreciated. Thanks!
<!--- <CFQUERY NAME="Test2" DATASOURCE="etcetra" DBTYPE="Oracle80">
UPDATE FN.TC_WO_DSP
SET FN.TC_WO_DSP.DESCRIPTION = FN.TC_WORK_ORDER.Description
WHERE FN.TC_WO_DSP.Description = '#Test1.Description#'
</CFQUERY> --->
So, I created this query to give me the results of which descriptions are different:
<CFQUERY NAME="Test1" DATASOURCE="etcetra" DBTYPE="Oracle80">
SELECT FN.TC_WORK_ORDER.Description
FROM FN.TC_WORK_ORDER, FN.TC_WO_DSP
WHERE FN.TC_WO_DSP.WO = FN.TC_WORK_ORDER.WO
AND FN.TC_WO_DSP.Description <> FN.TC_WORK_ORDER.Description
</CFQUERY>
This simply give me all the descriptions from the database table which are different (using #Test1.Description# in CFOUTPUT tags). However, what I want to do is actually update the display table (again, table A) when the database table (table b) is changed.
Whenever I try a Update query, it works fine if only one description has changed. If more than one changes, I get an error.
Here is my second query. Any ideas on how to fix this so that it will accomodate mulitple changes, instead of only one? Any help is much appreciated. Thanks!
<!--- <CFQUERY NAME="Test2" DATASOURCE="etcetra" DBTYPE="Oracle80">
UPDATE FN.TC_WO_DSP
SET FN.TC_WO_DSP.DESCRIPTION = FN.TC_WORK_ORDER.Description
WHERE FN.TC_WO_DSP.Description = '#Test1.Description#'
</CFQUERY> --->