I am using SQL 2005. My query isn't working. I keep on getting the following error. The multi-part identifier "Pd.Mon_shnm" could not be bound. I am trying to use information from the dbo.dic_Period table and put it into the dbo.rpt_FYInfo table.
Tom
Tom
Code:
UPDATE rptdata_monthly.dbo.rpt_FYInfo
set mon_shnm = pd.mon_shnm
SELECT pd.mon_shnm
FROM rptdata_monthly.dbo.dic_Period pd
INNER JOIN rptdata_monthly.dbo.rpt_FYInfo FY ON FY.rptpd = pd.pd
WHERE FY.rptpd = 391 and FY.uci='BPA' and FY.mon_shnm is null