If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > "Invalid Bracketing of name"

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-05-04, 16:26
vern1959 vern1959 is offline
Registered User
 
Join Date: Apr 2004
Posts: 2
"Invalid Bracketing of name"

I imported this data base from access 97 to access 2000 and it works but when I try to add any thing it gives me the "Invalid Bracketing of name" error the orignal sql has 7 UNION SELECT statements simalar to the two shown hereand works fine
but we will need to add more tables shortly
can any guru help please



SELECT U.[Machine Name], U.[Part Number], U.Description, U.Programs
FROM [SELECT
"Mori" as [Machine Name],
[Part Number],
[Description],
[Programs]
FROM Mori
UNION SELECT
'LE' as [Machine Name],
[Part Number],
[Description],
[Programs]
FROM LE
]. AS U;
Reply With Quote
  #2 (permalink)  
Old 04-05-04, 16:31
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
This is bad SQL syntax. Try using:
PHP Code:
SELECT U.[Machine Name], U.[Part Number], U.DescriptionU.Programs
FROM 
(SELECT
"Mori" as [Machine Name],
[
Part Number],
[
Description],
[
Programs]
FROM Mori
UNION SELECT
'LE' as [Machine Name],
[
Part Number],
[
Description],
[
Programs]
FROM LE) AS U
If it complains about the semi-colon at the end, remove that too.

-PatP
Reply With Quote
  #3 (permalink)  
Old 04-05-04, 17:49
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
Re: "Invalid Bracketing of name"

Quote:
Originally posted via PM by vern1959
THANK YOU FOR THE HELP
WERID THING THOUGH I CHANGED THE [] TO () AND DELITED THE
. JUST BEFORE "AS U" IT RUNS GREAT WHATS WERID IS WHEN I SAVE
AND EXIT THE SQL EDITOR AND RE OPEN THE SQL TO EDIT IT
THE [] and " . "are back and any attempt to edit causes the original error
"BUT" when I replace the () and delite the " . " it work but saves as described above again is this normal ?
Vern posted this as a PM, but I'm responding here in case others are reading this thread or have comments to offer.

I've never seen that behavior in Access-2000 before. This smells of DAO, which was the default for Access-97, but I can't remember having seen it there either.

-PatP
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On