Skip to main content
Known Participant
May 8, 2009
Question

how to fix this error

  • May 8, 2009
  • 2 replies
  • 830 views

Hi when i tried to run this query i am getting error as

[Macromedia][SQLServer JDBC Driver][SQLServer]The multi-part identifier "l.cpt_dpt_cd" could not be bound.

here is the code

please help me to solve this thanks,

<cfquery name="Update" datasource="#db#">
     UPDATE dbo.di_audit_corp_upc_tbl   
     SET
     cpt_dpt_cd = l.cpt_dpt_cd
     , cpt_com_cd = l.cpt_com_cd
     , sub_com_cd = l.sub_com_cd
     , cas_upc_no = '0000000000000'
     , con_upc_tx = l.pid_lng_dsc_tx
     , pid_lng_dsc_tx = l.pid_lng_dsc_tx
     , pid_sht_dsc_tx = l.pid_sht_dsc_tx
     , rev_by = l.rev_by
     , rev_dt = l.rev_dt
</cfquery>
<cfquery name="Select" datasource="#db#">
      SELECT *       
         FROM [dbo].[di_audit_corp_upc_ldr_tbl] l
         INNER JOIN dbo.di_audit_corp_upc_tbl u ON l.con_upc_no = u.con_upc_no
</cfquery>

This topic has been closed for replies.

2 replies

Participant
May 14, 2009

What you are doing in the update query?

<cfquery name="Update" datasource="#db#">
     UPDATE dbo.di_audit_corp_upc_tbl SET cpt_dpt_cd = l.cpt_dpt_cd

What you u have in l?Whether l is a structure. Try to dump the l .

If datatype of  "l.cpt_dpt_cd" is string, then try to use like this

  UPDATE dbo.di_audit_corp_upc_tbl SET cpt_dpt_cd = "#l.cpt_dpt_cd#"

Note: Always try to use CFQUERYPARAM in ur queries. It will help u to prevent sql injection attacks

Michael Borbor
Inspiring
May 8, 2009

There is a problem with your query that field doesn't exist check the

names in your db

Sincerely,

Michael