This will make the syntax error go away.USE EmployeeGOCREATE VIEW dbo.vw_EmpsalaryASSELECT TOP (100) PERCENT EmpID, LName, FName, SalaryFROM dbo.EmployeesORDER BY LNameGOSelect * from vw_EmpSalary
But...If you are using SQL 2005 or higher, this may not work as you expect. So instead, do this:USE EmployeeGOCREATE VIEW dbo.vw_EmpsalaryASSELECT EmpID, LName, FName, SalaryFROM dbo.EmployeesGOSelect * from vw_EmpSalary ORDER BY LName
This is because SQL 2005 will optimize away the "top 100 percent" and "order by" clause in the view. So your results may not be ordered as you expect.