473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

All Column Aliases Not Working

82 64KB
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.
Expand|Select|Wrap|Line Numbers
  1. SELECT      TOP 100 PERCENT dbo.ProviderNEW.NPI AS [Provider ID], 'Primary Care | Adults' AS [Practice Type], 
  2.                         dbo.ProviderRelationships.OPNumber AS [Practice ID], dbo.ProviderNEW.LastName AS [Provider Name Last], 
  3.                         dbo.ProviderNEW.FirstName AS [Provider Name First], dbo.ProviderNEW.MiddleInitial AS [Provider Name Initial], 
  4.                         dbo.ProviderNEW.Degree AS [Credential 1], dbo.PracticeTable.AgeCategory
  5. FROM          dbo.ProviderRelationships INNER JOIN
  6.                         dbo.ProviderNEW ON dbo.ProviderRelationships.NPI = dbo.ProviderNEW.NPI INNER JOIN
  7.                         dbo.PracticeTable ON dbo.ProviderRelationships.OPNumber = dbo.PracticeTable.OPNumber
  8. WHERE      (dbo.PracticeTable.PrimaryCare = 1) AND (dbo.ProviderRelationships.DisplayWeb <> 0) AND 
  9.                         (dbo.ProviderRelationships.EndDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) AND (dbo.PracticeTable.AgeCategory <> N'Children Only') OR
  10.                         (dbo.PracticeTable.PrimaryCare = 1) AND (dbo.ProviderRelationships.DisplayWeb IS NULL) AND 
  11.                         (dbo.ProviderRelationships.EndDate = CONVERT(DATETIME, '2099-01-01 00:00:00', 102)) AND (dbo.PracticeTable.AgeCategory <> N'Children Only')
Mar 27 '14 #1
1 1203
barbarao
82 64KB
Hi. I copied the query, renamed it, and the aliases show properly. Not sure why but at least I got it to work.
Mar 27 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Andrew | last post by:
With command-line interface ( 3.23.37, UNIX Socket ) all is well with column aliasing. However, column aliases disappear in Excel, over ODBC, when there are multiple (joined) tables in the query. ...
6
by: DC | last post by:
Is there a way to use a column alias in an another calculation within the same query? Since I am using some long and complex logic to compute total1 and total2, I don't want to repeat the same...
2
by: JJA | last post by:
Please advise on how to get the GROUP BY coded in an acceptable way: DECLARE @LO INT DECLARE @HI INT DECLARE @StartDate varchar(10) DECLARE @EndDate varchar(10) SELECT @StartDate =...
7
by: David Freeman | last post by:
Hi There! Below is my VB.NET code... Dim strSQL As String strSQL = "SELECT , FROM Customers GROUP BY , , " Dim oleConn As OleDbConnection = Nothing
1
by: David Garamond | last post by:
CREATE TABLE somereallylongname1 (...); CREATE TABLEALIAS name1 somereallylongname1; SELECT * FROM name1 ...; Is there such a thing? I know there's alias in SELECT and completion in psql (or...
5
by: Mark Cave-Ayland | last post by:
Hi everyone, I'm trying to calculate an output column which is the difference of two other columns in the query output; the first column is an aggregate of items in stock, while the second...
2
by: Amir Zicherman | last post by:
hi, i have a btree index on col1 in table1. The column has either values 1,2,3, or 4. 4 does not appear that much in the table (only 5 times). there are about 20 million rows in the table. ...
4
by: Paul E Collins | last post by:
I'm using mysql_fetch_array to run a query along these lines: SELECT A.name, B.name FROM A, B WHERE A.id = B.id I tried this code: while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {...
12
by: dmorand | last post by:
I'm trying to get a 3 column layout with equal widths. Here is my page: domosworld.net I want it so the two gray borders in the middle always extend to the bottom of the page. I have it setup...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.