Difference between revisions of "Example of executing sql script by sqlcmd"

From MyWiki
Jump to: navigation, search
(Created page with "< source lang="sql"> USE AdventureWorks2012; GO SELECT p.FirstName + ' ' + p.LastName AS 'Employee Name', a.AddressLine1, a.AddressLine2 , a.City, a.PostalCode FROM P...")
(No difference)

Revision as of 13:13, 15 March 2017

< source lang="sql"> USE AdventureWorks2012; GO SELECT p.FirstName + ' ' + p.LastName AS 'Employee Name', a.AddressLine1, a.AddressLine2 , a.City, a.PostalCode FROM Person.Person AS p

  INNER JOIN HumanResources.Employee AS e   
       ON p.BusinessEntityID = e.BusinessEntityID  
   INNER JOIN Person.BusinessEntityAddress bea   
       ON bea.BusinessEntityID = e.BusinessEntityID  
   INNER JOIN Person.Address AS a   
       ON a.AddressID = bea.AddressID;  

GO


</source>