?
Solved

how to use alias in MS access

Posted on 2009-04-02
3
Medium Priority
?
889 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

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 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
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 use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

741 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