Results 1 to 5 of 5

Thread: The column prefix 'MS1' does not match with a table name or alias name used in the...

  1. #1
    Join Date
    Aug 2007
    Posts
    2

    The column prefix 'MS1' does not match with a table name or alias name used in the...

    I have an Access database, that is in connection with sql server.
    On my computer with access2007 i have no problems with viewing tables and stuff.

    But on other computers with access2003 it gives an error when i use this query:
    Code:
    INSERT INTO [tbl_sap-staffel] ( ItemCode, CardCode, [Amount-0], [Price-0], [Amount-1], [Price-1], [Amount-2], [Price-2] )
    SELECT [qry_sap-spp-0].ItemCode, [qry_sap-spp-0].CardCode, [qry_sap-spp-0].Amount, [qry_sap-spp-0].Price, [qry_sap-spp-1].Amount, [qry_sap-spp-1].Price, [qry_sap-spp-2].Amount, [qry_sap-spp-2].Price
    FROM ([qry_sap-spp-0] LEFT JOIN [qry_sap-spp-1] ON ([qry_sap-spp-0].ItemCode = [qry_sap-spp-1].ItemCode) AND ([qry_sap-spp-0].CardCode = [qry_sap-spp-1].CardCode)) LEFT JOIN [qry_sap-spp-2] ON ([qry_sap-spp-1].ItemCode = [qry_sap-spp-2].ItemCode) AND ([qry_sap-spp-1].CardCode = [qry_sap-spp-2].CardCode);
    It says:
    ODBC call failed
    [Microsoft][ODBC SQL Server Driver][SQL Server]
    The column prefix 'MS1' does not match with a table name or alias name used in the query.
    The column prefix 'MS2' does not match with a table name or alias name used in the query.
    And it will give this error 6 times.

    I dont know what to do.
    Can anybody help me?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    I don't see MS1 or MS2 in the query you posted.

  3. #3
    Join Date
    Aug 2007
    Posts
    2
    that's the weird thing. I dont have any field that has MS1 as name.

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    What version of SQL Server you are using?

  5. #5
    Join Date
    Dec 2004
    Posts
    502
    Look for references to MS1 or MS2 in your saved queries ("qry_sap-spp-0", "qry_sap-spp-1", etc.).

Posting Permissions

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