Solved

how to use alias in MS access

Posted on 2009-04-02
3
883 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 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

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
As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

729 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