If you want to update your table from join table value you can try with this:
UPDATE r
SET r.l_auto_refill = 1
,r.d_start_date = p.dDispDate
,r.n_frequency = p.nDispDaysSupply
,r.d_next_fill = DATEADD(DAY, p.ndispdayssupply, p.ddispdate)
FROM rx r
INNER join
profile AS p ON r.[rxno_PK] = p.rxno_FK
where r.rxno_PK = '000010578126'
Comments
Post a Comment