Invalid bracketing of name…

T

Tim

Hi folks,

When I ran the following query, I got an error
message “Invalid bracketing of name…”

SELECT VT.[First ID]
FROM [SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3]. AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Could anyone tell me how to fix the error?

Thanks in advance.

Tim.
 
G

Gerald Stanley

Try () instead of [] around the SELECT DISTINCT Table3 etc

SELECT VT.[First ID]
FROM (SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3) AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Hope This Helps
Gerald Stanley MCSD
 
T

Tim

Gerald,

I can't change [] to () because I am using access 97. If
I do, I will get another error message.

The problem is coming from Table3.[First ID] and Table3.
[First Value].

Could you help me out?

Thanks.

Tim.
-----Original Message-----
Try () instead of [] around the SELECT DISTINCT Table3 etc

SELECT VT.[First ID]
FROM (SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3) AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi folks,

When I ran the following query, I got an error
message "Invalid bracketing of name."

SELECT VT.[First ID]
FROM [SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3]. AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Could anyone tell me how to fix the error?

Thanks in advance.

Tim.

.
.
 
G

Gerald Stanley

Try changing the column names. First is a reserved word
(as it is a function name) and, although you have it
enclosed in [] as part of a column name, Access may still
be getting confused. As a matter of best practise, it is
never recommended to have spaces in names for table,
queries and columns etc.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Gerald,

I can't change [] to () because I am using access 97. If
I do, I will get another error message.

The problem is coming from Table3.[First ID] and Table3.
[First Value].

Could you help me out?

Thanks.

Tim.
-----Original Message-----
Try () instead of [] around the SELECT DISTINCT Table3 etc

SELECT VT.[First ID]
FROM (SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3) AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi folks,

When I ran the following query, I got an error
message "Invalid bracketing of name."

SELECT VT.[First ID]
FROM [SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3]. AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Could anyone tell me how to fix the error?

Thanks in advance.

Tim.

.
.
.
 
T

Tim

Gerald,

In the true table I have name other than FIRST that is not
my problem and I can't change my field name because I
don't own the table. Any other idea?

Thanks a lot.

Tim.
-----Original Message-----
Try changing the column names. First is a reserved word
(as it is a function name) and, although you have it
enclosed in [] as part of a column name, Access may still
be getting confused. As a matter of best practise, it is
never recommended to have spaces in names for table,
queries and columns etc.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Gerald,

I can't change [] to () because I am using access 97. If
I do, I will get another error message.

The problem is coming from Table3.[First ID] and Table3.
[First Value].

Could you help me out?

Thanks.

Tim.
-----Original Message-----
Try () instead of [] around the SELECT DISTINCT Table3 etc

SELECT VT.[First ID]
FROM (SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3) AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi folks,

When I ran the following query, I got an error
message "Invalid bracketing of name."

SELECT VT.[First ID]
FROM [SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3]. AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Could anyone tell me how to fix the error?

Thanks in advance.

Tim.

.

.
.
.
 
G

Gerald Stanley

Tim

Not really - going back to the change I suggested for ()
instead of []. What was the error message when you tried
that. It works in A2K3 but I don't have A97.

Gerald Stanley MCSD
-----Original Message-----
Gerald,

In the true table I have name other than FIRST that is not
my problem and I can't change my field name because I
don't own the table. Any other idea?

Thanks a lot.

Tim.
-----Original Message-----
Try changing the column names. First is a reserved word
(as it is a function name) and, although you have it
enclosed in [] as part of a column name, Access may still
be getting confused. As a matter of best practise, it is
never recommended to have spaces in names for table,
queries and columns etc.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Gerald,

I can't change [] to () because I am using access 97. If
I do, I will get another error message.

The problem is coming from Table3.[First ID] and Table3.
[First Value].

Could you help me out?

Thanks.

Tim.

-----Original Message-----
Try () instead of [] around the SELECT DISTINCT Table3 etc

SELECT VT.[First ID]
FROM (SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3) AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi folks,

When I ran the following query, I got an error
message "Invalid bracketing of name."

SELECT VT.[First ID]
FROM [SELECT DISTINCT Table3.[First ID], Table3.[First
Value] FROM Table3]. AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Could anyone tell me how to fix the error?

Thanks in advance.

Tim.

.

.

.
.
.
 
T

Tim

Gerald,

If I changed to () instead of [], I got the error message
of "syntax error in FROM clause"

Thanks.

Tim.
-----Original Message-----
Tim

Not really - going back to the change I suggested for ()
instead of []. What was the error message when you tried
that. It works in A2K3 but I don't have A97.

Gerald Stanley MCSD
-----Original Message-----
Gerald,

In the true table I have name other than FIRST that is not
my problem and I can't change my field name because I
don't own the table. Any other idea?

Thanks a lot.

Tim.
-----Original Message-----
Try changing the column names. First is a reserved word
(as it is a function name) and, although you have it
enclosed in [] as part of a column name, Access may still
be getting confused. As a matter of best practise, it is
never recommended to have spaces in names for table,
queries and columns etc.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Gerald,

I can't change [] to () because I am using access 97. If
I do, I will get another error message.

The problem is coming from Table3.[First ID] and Table3.
[First Value].

Could you help me out?

Thanks.

Tim.

-----Original Message-----
Try () instead of [] around the SELECT DISTINCT
Table3
etc
SELECT VT.[First ID]
FROM (SELECT DISTINCT Table3.[First ID], Table3. [First
Value] FROM Table3) AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi folks,

When I ran the following query, I got an error
message "Invalid bracketing of name."

SELECT VT.[First ID]
FROM [SELECT DISTINCT Table3.[First ID], Table3. [First
Value] FROM Table3]. AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Could anyone tell me how to fix the error?

Thanks in advance.

Tim.

.

.

.

.
.
.
 
T

Ted Allen

Hi Tim,

Like Gerald, I also don't have A97, but I suspect that
the ()'s are correct, and that there is some other syntax
error.

Your original post had a period after the FROM Table3
statement. Try taking that out and see if it will run.
If not, repost your current sql.

HTH

-Ted Allen
-----Original Message-----
Gerald,

If I changed to () instead of [], I got the error message
of "syntax error in FROM clause"

Thanks.

Tim.
-----Original Message-----
Tim

Not really - going back to the change I suggested for ()
instead of []. What was the error message when you tried
that. It works in A2K3 but I don't have A97.

Gerald Stanley MCSD
-----Original Message-----
Gerald,

In the true table I have name other than FIRST that is not
my problem and I can't change my field name because I
don't own the table. Any other idea?

Thanks a lot.

Tim.
-----Original Message-----
Try changing the column names. First is a reserved word
(as it is a function name) and, although you have it
enclosed in [] as part of a column name, Access may still
be getting confused. As a matter of best practise,
it
is
never recommended to have spaces in names for table,
queries and columns etc.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Gerald,

I can't change [] to () because I am using access 97.
If
I do, I will get another error message.

The problem is coming from Table3.[First ID] and Table3.
[First Value].

Could you help me out?

Thanks.

Tim.

-----Original Message-----
Try () instead of [] around the SELECT DISTINCT Table3
etc

SELECT VT.[First ID]
FROM (SELECT DISTINCT Table3.[First ID], Table3. [First
Value] FROM Table3) AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi folks,

When I ran the following query, I got an error
message "Invalid bracketing of name."

SELECT VT.[First ID]
FROM [SELECT DISTINCT Table3.[First ID], Table3. [First
Value] FROM Table3]. AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Could anyone tell me how to fix the error?

Thanks in advance.

Tim.

.

.

.

.

.
.
.
 
J

John Spencer (MVP)

You cannot in Access 97 have a subquery that has brackets in it. It just won't work.

You will have to do this in two queries, since you say you cannot change the
field names.

SELECT DISTINCT Table3.[First ID],
Table3.[First Value]
FROM Table3

Save that query as VT

Now, use that

SELECT [First ID]
FROM VT
Group By [First ID]
Having Count [First Id] > 1
 
T

Tim

Ted,

I remove the . and replace the () but I still got syntax
error FROM clause.

Any idea?

Thanks.

Tim.
-----Original Message-----
Hi Tim,

Like Gerald, I also don't have A97, but I suspect that
the ()'s are correct, and that there is some other syntax
error.

Your original post had a period after the FROM Table3
statement. Try taking that out and see if it will run.
If not, repost your current sql.

HTH

-Ted Allen
-----Original Message-----
Gerald,

If I changed to () instead of [], I got the error message
of "syntax error in FROM clause"

Thanks.

Tim.
-----Original Message-----
Tim

Not really - going back to the change I suggested for ()
instead of []. What was the error message when you tried
that. It works in A2K3 but I don't have A97.

Gerald Stanley MCSD
-----Original Message-----
Gerald,

In the true table I have name other than FIRST that
is
not
my problem and I can't change my field name because I
don't own the table. Any other idea?

Thanks a lot.

Tim.
-----Original Message-----
Try changing the column names. First is a reserved word
(as it is a function name) and, although you have it
enclosed in [] as part of a column name, Access may still
be getting confused. As a matter of best practise,
it
is
never recommended to have spaces in names for table,
queries and columns etc.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Gerald,

I can't change [] to () because I am using access 97.
If
I do, I will get another error message.

The problem is coming from Table3.[First ID] and Table3.
[First Value].

Could you help me out?

Thanks.

Tim.

-----Original Message-----
Try () instead of [] around the SELECT DISTINCT Table3
etc

SELECT VT.[First ID]
FROM (SELECT DISTINCT Table3.[First ID], Table3. [First
Value] FROM Table3) AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi folks,

When I ran the following query, I got an error
message "Invalid bracketing of name."

SELECT VT.[First ID]
FROM [SELECT DISTINCT Table3.[First ID], Table3. [First
Value] FROM Table3]. AS VT
GROUP BY [First ID]
HAVING Count([First ID]) > 1;

Could anyone tell me how to fix the error?

Thanks in advance.

Tim.

.

.

.

.

.

.
.
.
 
V

Van T. Dinh

I haven't got A97 to test but the easiest way is to use 2
Queries as John Spencer suggested (and so did I in the
previous thread)

Just in case anyone wonders "VT" stands for "Virtual
Table".

HTH
Van T. Dinh
MVP (Access)
 
T

Tim

Van,

Thanks.

Tim.
-----Original Message-----
I haven't got A97 to test but the easiest way is to use 2
Queries as John Spencer suggested (and so did I in the
previous thread)

Just in case anyone wonders "VT" stands for "Virtual
Table".

HTH
Van T. Dinh
MVP (Access)




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top