Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS [%$##@_Alias]?

Status
Not open for further replies.

robdunfey

Technical User
Apr 26, 2002
110
GB
Hi-

Could someone please explain what the AS [%$##@_Alias] refers to in this query? It works but isnt the name of a table or query in the database?

Any indication, much appreciated,

Rob


SELECT DISTINCT SITE
FROM [SELECT SITE, ID, count(*)
FROM L_ALL
GROUP BY SITE, ID
HAVING count(*) > 1]. AS [%$##@_Alias];
 
Rob,

If I am not mistaken the [%$##@_Alias] is an internal reference that MS Access uses to create the headings for the GROUP BY query such as Count of Site ID.


HTH,

Steve
 
It's actually a query within a query.

Basically a query called %$##@_Alias is created with the SQL

SELECT SITE, ID, count(*)
FROM L_ALL
GROUP BY SITE, ID
HAVING count(*) > 1

then another query is based on that query.

It's an integrated version of having 2 seperate queries.

Ben

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top