5 Replies Latest reply on Jan 17, 2014 9:02 AM by Robert Morton

    Getting "An error occurred validating the custom SQL connection" when attempting to use a tablename alias on a join table.

    Omar Serang

      Getting "An error occurred validating the custom SQL connection" when attempting to use a tablename alias on a join table.

       

      Microsoft JET database error 0x80004005: Syntax error in JOIN operation.

       

      Trying to clean up some multi-table SQL using tablename aliases and when I add a tablename alias to the join table I get the above error.

       

      This code works:

       

      SELECT ud.[activation-date] AS [ActivationDate],

        ud.[user-ID] AS [user-ID],

        [platform_events#tab].[count] AS [count],

        [platform_events#tab].[date] AS [date]

      FROM [user_data#tab] AS ud

        LEFT JOIN [platform_events#tab] ON ud.[user-ID] = [platform_events#tab].[user-ID]

       

      This code does not:

       

      SELECT ud.[activation-date] AS [ActivationDate],

        ud.[user-ID] AS [user-ID],

        [platform_events#tab].[count] AS [count],

        [platform_events#tab].[date] AS [date]

      FROM [user_data#tab] AS ud

        LEFT JOIN [platform_events#tab] AS pe ON ud.[user-ID] = [platform_events#tab].[user-ID]

       

      AFAICT this is the correct syntax. Any ideas?