Solved

how to use alias in MS access

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
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 coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now