Solved

how to use alias in MS access

Posted on 2009-04-02
3
874 Views
Last Modified: 2012-06-27
i have a table
Id
CountSubmitted
countA1
CountA2
countA3
countB1
CountB2
countB3

select * from table
1  100   25 25 25 15 5 5
select Id,CountSubmitted, 
countA1+countA2+countA3 as CountA,
countB1+countB2+countB3 as CountB
where CountSubmitted<> CountA+CountB
 
but ut does not recognise CountA+CountB and i am using:
select Id,CountSubmitted, 
countA1+countA2+countA3 as CountA,
countB1+countB2+countB3 as CountB
where CountSubmitted<> countA1+countA2+countA3 +countB1+countB2+countB3

Open in new window

0
Comment
Question by:rfedorov
  • 2
3 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24051714
AFAIK, you cannot use the aliases immediatelyy.
0
 

Author Comment

by:rfedorov
ID: 24051734

It was fast...
what to do?
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 24051926
you have already 1 alternative.

here is another:
select *
from (
  select Id,CountSubmitted, countA1+countA2+countA3 as CountA, countB1+countB2+countB3 as CountB
    from table
  ) sq
where CountSubmitted <> CountA+CountB

Open in new window

0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
GFI and SCCM 2012 5 74
Excel Automation of Autosum 23 109
Cannot get OneDrive working on Wndows 10 2 50
word is recognized as adobe and adobe as IE files 14 39
We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
This collection of functions covers all the normal rounding methods of just about any numeric value.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question