Skip to main content
Known Participant
May 8, 2009
Question

how to fix this error

  • May 8, 2009
  • 1 reply
  • 814 views

Hi in coldfusion i had some queries where we havae to select data from queries and store in temperory table but when i tried to do this i am getting error as

ColdFusion was looking at the following text:

FROM

The CFML compiler was processing:

  • An expression that began on line 48, column 14.
    The expression might be missing an ending #, for example, #expr instead of #expr#.
  • The body of a cfquery tag beginning on line 46, column 3.

here is the code :

<cfquery name="SelectDistinct" datasource="#request.dsnCAO#">
    SELECT DISTINCT cpt_com_cd,sub_com_cd,con_upc_no,pid_lng_dsc_tx,pid_sht_dsc_tx,rev_by,rev_dt
    INTO #di_audit_corp_upc_ldr_tbl
    FROM [dbo].[di_audit_corp_upc_ldr_tbl]
</cfquery>
<cfquery name="Drop" datasource="#request.dsnCAO#">
    DROP TABLE [dbo].[di_audit_corp_upc_ldr_tbl]
   
</cfquery>
<cfquery name="SelectDistinctdi" datasource="#request.dsnCAO#">
    SELECT  cpt_dpt_cd,cpt_com_cd,sub_com_cd,con_upc_no,pid_lng_dsc_tx,pid_sht_dsc_tx,rev_by,rev_dt    -- 3774 distinct
    INTO [dbo].[di_audit_corp_upc_ldr_tbl]
    FROM #di_audit_corp_upc_ldr_tbl
   
</cfquery>
<cfquery name="Drop1" datasource="#request.dsnCAO#">
    DROP TABLE #di_audit_corp_upc_ldr_tbl
   
</cfquery>

Please help me in this

Thanks ,

kiran

This topic has been closed for replies.

1 reply

ilssac
Inspiring
May 8, 2009

The error message tells you what it is looking at...

    INTO #di_audit_corp_upc_ldr_tbl

# characters are used by CFML to designate variables.  If you are trying to use a variable on that line you need to end it with another # character at the end of the variable name.  If you are not trying to use a variable on that line but the # character is part of the table name then you need to escape it in the CFML code by doubling it; i.e. ##di_audit_corp_upc_lbr_tbl.  If you are doing neither of these and the # character is not supposed to be there, remove it.

cfnewAuthor
Known Participant
May 8, 2009

hi Lan thanks for ur help it helped me a lot