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

how to fix this error

New Here ,
May 08, 2009 May 08, 2009

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>

TOPICS
Getting started
813
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
Guru ,
May 08, 2009 May 08, 2009

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

names in your db

Sincerely,

Michael

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
New Here ,
May 14, 2009 May 14, 2009
LATEST

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

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