Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELETE FROM [AzureProdLinkedServer].[CPO].[DBO].[TRAININGS]
- INSERT INTO
- [AzureProdLinkedServer].[CPO].[DBO].[TRAININGS] (
- TrainingId,
- Topic,
- StartDate,
- DurationHours,
- DurationMinutes,
- TrainerContactId,
- MaxUsers,
- MaxDealers,
- TrainingType,
- Active
- )
- SELECT
- TrainingId,
- Topic,
- CAST(DATEADD(hour,4,TrainingDateTime) AS datetime) as TrainingDateTime,
- DurationHours,
- DurationMinutes,
- TrainerContactId,
- MaxUsers,
- MaxDealers,
- TrainingType,
- Active
- FROM
- GMSQL1.BRANDMANAGER.DBO.TRAINING gbt
- WHERE
- gbt.TrainingID NOT IN (SELECT TRAININGID FROM [AzureProdLinkedServer].[CPO].[DBO].[TRAININGS])
- AND gbt.TrainingType IN ('H','A')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement