Re: Need help on query
- From: "John Spencer" <spencer@xxxxxxxxx>
- Date: Wed, 6 Dec 2006 07:37:36 -0500
As I noted earlier you need to use [] around all field and table names that
contain spaces
SELECT Min([Sr Number]) AS [MinOfSr Number]
, [Client Name]
, Min ([Project StartDate]) AS [MinOfProject Start Date]
FROM [HP Tracker]
GROUP BY [Client Name]
The above could be in error on the FROM line if your table is named HP and
not HP Tracker.
"FROM HP Tracker " would be interpreted as "FROM HP as Tracker". That
assigns an alias of Tracker to an instance of the HP table.
Is this the entire query? You say the error message is check subquery
syntax. If this is a subquery, there are other considerations that could be
making this fail. Such as a subquery in a select clause can only return one
column. A subquery in the FROM clause cannot contain square brackets (at
least if you are using the native-to-Access JET engine).
"dinadvani via AccessMonster.com" <u22798@uwe> wrote in message
news:6a59368be60b1@xxxxxx
Hi John,
Thanks for your reply.
But still the same error message"Check the subquery syntax and enclose
subquery in parenthisis"
I am trying this querry
SELECT Min([Sr Number]) AS MinOfSr Number,[Client Name], Min (Project
Start
Date) AS MinOfProject Start Date FROM HP Tracker GROUP BY [Client Name]
Please Help...
Thanks,
DA
John Spencer wrote:
You must surround field and table names that contain spaces with square
braces [ ]. This rule also applies to field names that contain other
non-alphanumeric characters (such as - / ; + () *).
Try the following query
SELECT Min([Sr Number]) AS MinOfSr Number
, [Client Name]
, Min (StartDate) AS MinOfStartDate
FROM HP
GROUP BY [Client Name]
Table name is HP
Hi,[quoted text clipped - 27 lines]
FROM tblProjects
GROUP BY tblProjects.Account;
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200612/1
.
- References:
- Need help on query
- From: dinadvani via AccessMonster.com
- Re: Need help on query
- From: dneagle via AccessMonster.com
- Re: Need help on query
- From: dinadvani via AccessMonster.com
- Re: Need help on query
- From: John Spencer
- Re: Need help on query
- From: dinadvani via AccessMonster.com
- Need help on query
- Prev by Date: Query to group duplicates
- Next by Date: Re: Average Null Values
- Previous by thread: Re: Need help on query
- Next by thread: Re: date parameter calendar drop down
- Index(es):
Relevant Pages
|