I am getting a syntax error when I try to use an update statement. Here is the statement:
UPDATE sales_rep_by_mbu
SET sales_rep_by_mbu.SRRSM = producer_sales_role_codes.sales_role_cd_value
FROM producer_sales_role_codes, sales_rep_by_mbu
WHERE (sales_rep_by_mbu.tin = producer_sales_role_codes.tin AND sales_rep_by_mbu.company_cd = producer_sales_role_codes.company_cd AND
sales_rep_by_mbu.state = producer_sales_role_codes.state AND producer_sales_role_codes.sales_role_cd = "RSM" AND producer_sales_role_codes.mbu_cd = "SR")
When I run this statement, it works fine:
SELECT producer_sales_role_codes.sales_role_cd_value
FROM producer_sales_role_codes, sales_rep_by_mbu
WHERE (sales_rep_by_mbu.tin = producer_sales_role_codes.tin AND sales_rep_by_mbu.company_cd = producer_sales_role_codes.company_cd AND
sales_rep_by_mbu.state = producer_sales_role_codes.state AND producer_sales_role_codes.sales_role_cd = "RSM" AND producer_sales_role_codes.mbu_cd = "SR")
Could someone please help me.
Mark
UPDATE sales_rep_by_mbu
SET sales_rep_by_mbu.SRRSM = producer_sales_role_codes.sales_role_cd_value
FROM producer_sales_role_codes, sales_rep_by_mbu
WHERE (sales_rep_by_mbu.tin = producer_sales_role_codes.tin AND sales_rep_by_mbu.company_cd = producer_sales_role_codes.company_cd AND
sales_rep_by_mbu.state = producer_sales_role_codes.state AND producer_sales_role_codes.sales_role_cd = "RSM" AND producer_sales_role_codes.mbu_cd = "SR")
When I run this statement, it works fine:
SELECT producer_sales_role_codes.sales_role_cd_value
FROM producer_sales_role_codes, sales_rep_by_mbu
WHERE (sales_rep_by_mbu.tin = producer_sales_role_codes.tin AND sales_rep_by_mbu.company_cd = producer_sales_role_codes.company_cd AND
sales_rep_by_mbu.state = producer_sales_role_codes.state AND producer_sales_role_codes.sales_role_cd = "RSM" AND producer_sales_role_codes.mbu_cd = "SR")
Could someone please help me.
Mark