Results 1 to 13 of 13

Thread: Sorting Views

Threaded View

  1. #11
    Join Date
    Jan 2011
    Posts
    5
    Thanks for the suggestions - I removed the () surrounding 100 and recreated the view - same result, EmpName does not sort.

    Attached is screen capture of result with partial names erased to protect the innocent.


    script used:
    CREATE VIEW [dbo].[vwNewView2]

    AS

    SELECTTOP 100 PERCENT dbo.vwDetails.EmpName
    ,dbo.vwDetails.JobTitle AS EmpJobTitle
    ,dbo.vwDetails.DeptName AS EmpDept
    ,dbo.vwFTEParentsOnly.Name AS EmpSuper
    ,dbo.tblJobs.JobTitle AS SuperJobTitle

    FROM dbo.vwFTEDetails

    INNER JOIN dbo.vwParentsOnly ON dbo.vwDetails.Parent = dbo.vwParentsOnly.ID

    INNER JOIN dbo.tblJobs ON dbo.vwParentsOnly.JobID = dbo.tblJobs.JobID

    WHERE (dbo.vwDetails.EmpName IS NOT NULL)

    ORDER BY dbo.vwDetails.EmpName
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •