• Delete except one (Access 2000)

    Author
    Topic
    #400632

    I want to delete everything in the tables Students except the records
    for the student with ID number = 1.
    How can i do it ?
    The code i tried and failed was :

    Dim SQL As String
    DELETE * FROM Students WHERE StudentID t 1 ”
    what i mean is that student is not = 1,but i do not know how to express it

    Viewing 1 reply thread
    Author
    Replies
    • #782836

      Why do you have a “t” in WHERE StudentID t 1 ? Without the “t” it should work OK.

    • #782837

      Why do you have a “t” in WHERE StudentID t 1 ? Without the “t” it should work OK.

    Viewing 1 reply thread
    Reply To: Delete except one (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: