Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE @nNewEntityId int
- INSERT INTO Person.BusinessEntity
- (rowguid
- ,ModifiedDate)
- VALUES
- (NEWID()
- ,GETDATE())
- SELECT @nNewEntityId = @@identity
- INSERT INTO Person.Person
- (BusinessEntityID
- ,PersonType
- ,NameStyle
- ,Title
- ,FirstName
- ,MiddleName
- ,LastName
- ,Suffix
- ,EmailPromotion
- ,AdditionalContactInfo
- ,Demographics
- ,rowguid
- ,ModifiedDate)
- VALUES
- (@nNewEntityId
- ,'SC'
- ,0
- ,N''
- ,'Tom'
- ,'M'
- ,'JEDUSOR'
- ,'Lord'
- ,0
- ,NULL
- ,NULL
- ,NEWID()
- ,GETDATE())
- INSERT INTO HumanResources.Employee
- (BusinessEntityID
- ,NationalIDNumber
- ,LoginID
- ,OrganizationNode
- ,JobTitle
- ,BirthDate
- ,MaritalStatus
- ,Gender
- ,HireDate
- ,SalariedFlag
- ,VacationHours
- ,SickLeaveHours
- ,CurrentFlag
- ,rowguid
- ,ModifiedDate)
- VALUES
- (@nNewEntityId
- ,'012345678901234'
- ,'iamlordvoldemort@contoso.com'
- ,NULL
- ,'Unnamed'
- ,'1998-06-30'
- ,'M'
- ,'M'
- ,'2019-04-12'
- ,1
- ,2
- ,1
- ,1
- ,NEWID()
- ,GETDATE())
- INSERT INTO Sales.SalesPerson
- (BusinessEntityID
- ,TerritoryID
- ,SalesQuota
- ,Bonus
- ,CommissionPct
- ,SalesYTD
- ,SalesLastYear
- ,rowguid
- ,ModifiedDate)
- VALUES
- (@nNewEntityId
- ,NULL
- ,15000
- ,12
- ,10
- ,0
- ,0
- ,NEWID()
- ,GETDATE())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement