Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

INSERTs fail

New Here ,
Aug 22, 2008 Aug 22, 2008
Problem: A Coldfusion CFC has not been modified since 2006. It has been working correctly till the present. We just migrated to CF 8.0. Since migration, none of the INSERTs work. All of the INSERTs in the CFC follow the following format:

INSERT INTO table1
(a,b,c)
SELECT a, b, c
FROM table1
WHERE a = x
AND b = y
AND c = z

Error:
Error Executing Database Query.
ORA-00933: SQL command not properly ended

The error occurred in \\sw\regionweb\Dev\LB-IDS\C130\apps\ssl\ftims\TIS\tis.cfc: line 713
Called from \\sw\regionweb\Dev\LB-IDS\C130\apps\ssl\ftims\TIS\reviseTIS.cfm: line 3

711 : AND sub_system_index = #this.sub_system_index#
712 : AND test_sub_category = #this.test_sub_category#
713 : AND rev_number = '#this.rev_number#'
714 : </cfquery>
715 :

SQLSTATE 42000
SQL:

INSERT INTO ftim_tis_stakeholders
(project_number,
system_index,
sub_system_index,
test_sub_category,
rev_number,
rev_date,
tis_status,
originator,
modified_date)
SELECT #arguments.trgproject# project_number,
#arguments.trgsi# system_index,
#arguments.trgsub# sub_system_index,
#arguments.trgtsc# test_sub_category,
'new' rev_number,
'#dateformat(now())#' rev_date,
'd' tis_status,
#this.people_id# originator,
'#dateformat(now())#' modified_date
FROM ftim_assigned_tis_numbers
WHERE project_number = #this.project_number#
AND system_index = #this.system_index#
AND sub_system_index = #this.sub_system_index#
AND test_sub_category = #this.test_sub_category#
AND rev_number = '#this.rev_number#'

--------------------

If I stub out the offending INSERT call, the error jumps to the next (and the next) subsequent INSERT call, pointing to that WHERE clause as the error.

Is anyone else having similar problems upon migration? Does CF8 not support INSERT-SELECTs? Is there another construct within the code that has changed re CF8 and could cause this error? CF8 bug? I'm stumped!

Thanks, in advance, for any insight/solution.

TOPICS
Database access
277
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2008 Aug 22, 2008
LATEST
If rev_date and modified_date are date fields, my guess, and it's just a guess, is that dateformat(now()) is causing your problem.

Cold Fusion has a history of being less tolerent of improper code as version numbers get higher.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources