1

Here is my query:

UPDATE TBL_LABELS SET TMP.column_value = LBL.label_desc, TMP.info_value=LBL.helptext
       FROM TBL_LABELS TMP
       INNER JOIN hh_label_mast LBL ON TMP.column_name=LBL.lbl_id
       WHERE page_id in(as_page_id ,'HHGENPGID')
       AND lang_cd= as_langcd;

While executing this I am getting an error like "right syntax to use near FROM TBL_LABELS TMP INNER JOIN hh_label_mast LBL ON TMP.column_name=LBL.lbl_"

Can you please give me the right syntax?

0

1 Answer 1

4

There shouldn't be a FROM clause in the UPDATE syntax. You may want to try:

UPDATE      tbl_labels TMP
INNER JOIN  hh_label_mast LBL ON (TMP.column_name = LBL.lbl_id)
SET         TMP.column_value = LBL.label_desc, 
            TMP.info_value = LBL.helptext
WHERE       page_id IN(as_page_id ,'HHGENPGID') AND lang_cd = as_langcd;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.