All Column Aliases Not Working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • barbarao
    New Member
    • Apr 2013
    • 82

    All Column Aliases Not Working

    Hi,SQL backend, Access front end. I have a query which has 6 column aliases. Only two of them are showing properly. Anyone have an idea of what could be going on? Query follows. Thanks in advance.
    Code:
    SELECT      TOP 100 PERCENT dbo.ProviderNEW.NPI AS [Provider ID], 'Primary Care | Adults' AS [Practice Type], 
                            dbo.ProviderRelationships.OPNumber AS [Practice ID], dbo.ProviderNEW.LastName AS [Provider Name Last], 
                            dbo.ProviderNEW.FirstName AS [Provider Name First], dbo.ProviderNEW.MiddleInitial AS [Provider Name Initial], 
                            dbo.ProviderNEW.Degree AS [Credential 1], dbo.PracticeTable.AgeCategory
    FROM          dbo.ProviderRelationships INNER JOIN
                            dbo.ProviderNEW ON dbo.ProviderRelationships.NPI = dbo.ProviderNEW.NPI INNER JOIN
                            dbo.PracticeTable ON dbo.ProviderRelationships.OPNumber = dbo.PracticeTable.OPNumber
    WHERE      (dbo.PracticeTable.PrimaryCare = 1) AND (dbo.ProviderRelationships.DisplayWeb <> 0) AND 
                            (dbo.ProviderRelationships.EndDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) AND (dbo.PracticeTable.AgeCategory <> N'Children Only') OR
                            (dbo.PracticeTable.PrimaryCare = 1) AND (dbo.ProviderRelationships.DisplayWeb IS NULL) AND 
                            (dbo.ProviderRelationships.EndDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) AND (dbo.PracticeTable.AgeCategory <> N'Children Only')
  • barbarao
    New Member
    • Apr 2013
    • 82

    #2
    Hi. I copied the query, renamed it, and the aliases show properly. Not sure why but at least I got it to work.

    Comment

    Working...