Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. SELETE FROM [AzureProdLinkedServer].[CPO].[DBO].[TRAININGS]
  2.  
  3. INSERT INTO
  4. [AzureProdLinkedServer].[CPO].[DBO].[TRAININGS] (
  5. TrainingId,
  6. Topic,
  7. StartDate,
  8. DurationHours,
  9. DurationMinutes,
  10. TrainerContactId,
  11. MaxUsers,
  12. MaxDealers,
  13. TrainingType,
  14. Active
  15. )
  16. SELECT
  17. TrainingId,
  18. Topic,
  19. CAST(DATEADD(hour,4,TrainingDateTime) AS datetime) as TrainingDateTime,
  20. DurationHours,
  21. DurationMinutes,
  22. TrainerContactId,
  23. MaxUsers,
  24. MaxDealers,
  25. TrainingType,
  26. Active
  27. FROM
  28. GMSQL1.BRANDMANAGER.DBO.TRAINING gbt
  29. WHERE
  30. gbt.TrainingID NOT IN (SELECT TRAININGID FROM [AzureProdLinkedServer].[CPO].[DBO].[TRAININGS])
  31. AND gbt.TrainingType IN ('H','A')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement