Difference between revisions of "Example of executing sql script by sqlcmd"
From MyWiki
(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...") |
|||
Line 1: | Line 1: | ||
− | < source lang="sql"> | + | <source lang="sql"> |
USE AdventureWorks2012; | USE AdventureWorks2012; | ||
GO | GO |
Revision as of 13:14, 15 March 2017
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