SHARE
TWEET

Untitled

a guest Jun 25th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WITH PRODUCTION_CTE(ShortProdNo,BoatRefNumber,ProdNo, CustomerPoNumber,LoadDate, Trailer, VeadaBuilding)
  2. AS
  3. (
  4.     SELECT
  5.     FBS.BoatNumber AS ShortProdNo,
  6.     UOD..BoatRefNumber AS BoatRefNumber,
  7.     FBS.ProdNo AS ProdNo,
  8.     UOD.CustomerPoNumber AS CustomerPoNumber,
  9.     FBS.Shipped AS LoadDate,
  10.     FBS.TruckNum AS Trailer,
  11.     (CASE
  12.     WHEN Rtrim(UOD.CustomerPoNumber)='VEADA-VS1' THEN  'Bldg10'
  13.      ELSE 'Bldg4'
  14.      END) AS VeadaBuilding
  15. FROM SysproCompanyV.dbo.FlatBenningtonShipping as FBS
  16. INNER JOIN SysproCompanyV.dbo.UsrOrderDetails as UOD
  17. ON FBS.BoatNumber=UOD.BoatRefNumber)
  18.      
  19. Msg 102, Level 15, State 1, Line 17
  20. Incorrect syntax near ')'.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top