Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    24

    Unanswered: Msg 4104, could not be bound.

    I need some syntax help on the UPDATE statement below. Do I need to add a INNER JOIN? I only want to update the table for the specific carton_label entered by the user.

    Code:
    UPDATE t_pick_detail 
    SET pkd.packed_quantity = pkd.staged_quantity,
    	pkd.status = 'PACKED'
    FROM  t_pick_detail pkd, t_order orm
    WHERE pkd.status = 'AUDITED' 
    AND orm.carton_label = N'~carton_label~'
    (based on user input field)

    Msg 4104, Level 16, State 1, Line 1
    The multi-part identifier "pkd.packed_quantity" could not be bound.

  2. #2
    Join Date
    Oct 2009
    Posts
    27
    Hi,

    Use this script,

    UPDATE pkd
    SET pkd.packed_quantity = pkd.staged_quantity,
    pkd.status = 'PACKED'
    FROM t_pick_detail pkd, t_order orm
    WHERE pkd.status = 'AUDITED'
    AND orm.carton_label = N'carton_label'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •