Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    2

    Unanswered: "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;

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    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

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54

    Re: "Invalid Bracketing of name"

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •