none
Access 2016 SQL error 1001 RRS feed

  • Question

  • Unable to edit query SQL when there is a where clause but no group by without getting the -1001 error. 

    Example:  This query is fine. 

    SELECT DISTINCT BB1.StudentID, Table43.Booking_date, Table43.Session
    FROM BB1 INNER JOIN Table43 ON BB1.StudentID = Table43.StudentID
    WHERE (((Table43.Session)="230"));

    But if I simply enter the SQL editor (and don't even make a change), I can not save it without the Reserved -1001 error popup even if it was already saved as is earlier.  Apparently it needs notation like

    SELECT DISTINCT [BB1].[StudentID], [Table43].[Booking_date], [Table43].[Session]
    FROM BB1 INNER JOIN Table43 ON [BB1].[StudentID] = [Table43].[StudentID]
    WHERE ((([Table43].[Session])="230"));

    in order to be accepted. In particular the [] around the field before the FROM

    SELECT DISTINCT [BB1].[StudentID], [Table43].[Booking_date], [Table43].Session
    FROM BB1 INNER JOIN [Table43] ON BB1.[StudentID] = Table43.[StudentID]
    WHERE ((([Table43].[Session])="230"));
    is no good, but

    SELECT DISTINCT [BB1].[StudentID], [Table43].[Booking_date], [Table43].[Session]
    FROM BB1 INNER JOIN [Table43] ON BB1.[StudentID] = Table43.[StudentID]
    WHERE ((([Table43].[Session])="230"));

    will work.

    Friday, February 19, 2016 5:38 PM

Answers

  • Hi Mcrego,

     

    Based on your description, for Access SQL issue, we’d suggest you to confirm that in MSDN forum first for good measure.

     

    https://social.msdn.microsoft.com/Forums/en-us/home

     

    The reason why we suggest posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

     

    Best Regards,

    Tao


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, February 22, 2016 11:38 AM
    Moderator