January 20, 2009 at 11:31 pm
Hi, I posted in the wrong forum earlier. I can't get my update table to update. I know its reading from the EPool table (which is empty), but I can't figure out the right way to do it. Thanks for any assistance!
UPDATE dbo.EPool
SET dbo.EPool.UIC = dbo.NAVMC.UIC
,dbo.EPool.TAM5 = dbo.NAVMC.TAM5
,dbo.EPool.NAVMCPO = dbo.NAVMC.PO
,dbo.EPool.OPFORTETotal = dbo.OPFORTE.OrgQTY
,PO_Over = CASE WHEN
(dbo.NAVMC.PO > dbo.OPFORTE.OrgQTY) THEN dbo.NAVMC.PO -
dbo.OPFORTE.OrgQTY ELSE '0' END
,PO_Under = CASE WHEN
(dbo.NAVMC.PO < dbo.OPFORTE.OrgQTY) THEN dbo.OPFORTE.OrgQTY -
dbo.NAVMC.PO ELSE '0' END
FROM dbo.OPFORTE RIGHT JOIN (dbo.NAVMC RIGHT JOIN tblUnit_Ref ON dbo.NAVMC.UIC = tblUnit_Ref.UIC) ON dbo.OPFORTE.MEFUIC = tblUnit_Ref.MEFUIC, dbo.EPool
WHERE (((dbo.tblUnit_Ref.DET)= 0) AND ((dbo.NAVMC.TAM5) Like '[A-E]%' And (dbo.NAVMC.TAM5) = dbo.OPFORTE_.TAM5))
January 20, 2009 at 11:33 pm
Pls post your replies to http://www.sqlservercentral.com/Forums/Topic640431-338-1.aspx?Update=1
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply