SHARE
TWEET

Untitled

a guest Nov 14th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IF NOT EXISTS(SELECT 1 FROM sys.columns
  2.           WHERE Name = N'Pred2015'
  3.           AND Object_ID = Object_ID(N'schemaName.PF_TT_FoodGroup_Coffee'))
  4. BEGIN
  5.     ALTER TABLE PF_TT_FoodGroup_Coffee
  6. ADD Pred2015 float;
  7. END
  8.  
  9. IF NOT EXISTS(SELECT 1 FROM sys.columns
  10.           WHERE Name = N'Pred2016'
  11.           AND Object_ID = Object_ID(N'schemaName.PF_TT_FoodGroup_Coffee'))
  12. BEGIN
  13.     ALTER TABLE PF_TT_FoodGroup_Coffee
  14. ADD Pred2016 float;
  15. END
  16.  
  17. IF NOT EXISTS(SELECT 1 FROM sys.columns
  18.           WHERE Name = N'Pred2017'
  19.           AND Object_ID = Object_ID(N'schemaName.PF_TT_FoodGroup_Coffee'))
  20. BEGIN
  21.     ALTER TABLE PF_TT_FoodGroup_Coffee
  22. ADD Pred2017 float;
  23. END
  24.  
  25. IF NOT EXISTS(SELECT 1 FROM sys.columns
  26.           WHERE Name = N'Pred2018'
  27.           AND Object_ID = Object_ID(N'schemaName.PF_TT_FoodGroup_Coffee'))
  28. BEGIN
  29.     ALTER TABLE PF_TT_FoodGroup_Coffee
  30. ADD Pred2018 float;
  31. END
  32.  
  33. IF NOT EXISTS(SELECT 1 FROM sys.columns
  34.           WHERE Name = N'Pred2019'
  35.           AND Object_ID = Object_ID(N'schemaName.PF_TT_FoodGroup_Coffee'))
  36. BEGIN
  37.     ALTER TABLE PF_TT_FoodGroup_Coffee
  38. ADD Pred2019 float;
  39. END
  40.  
  41. IF NOT EXISTS(SELECT 1 FROM sys.columns
  42.           WHERE Name = N'Pred2020'
  43.           AND Object_ID = Object_ID(N'schemaName.PF_TT_FoodGroup_Coffee'))
  44. BEGIN
  45.     ALTER TABLE PF_TT_FoodGroup_Coffee
  46. ADD Pred2020 float;
  47. END
RAW Paste Data
Top