Error from Delete query with inner join

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #31
    In essence it's the same as dsantino's suggestion but it is syntactically different.

    Comment

    • Rick Beach
      New Member
      • Jan 2011
      • 25

      #32
      In Dsantino's the parenthesis were the onle real differences that I notice once the tags "e" and "chs" are removed:

      Dsantino's where statement:
      WHERE Equipment.[EquipJ-tag#] IN(SELECT JTag FROM CHSRRequestInPr ogressB)

      Your where statement:
      WHERE (((Equipment.[EquipJ-tag#]) In (SELECT JTag FROM CHSRRequestInPr ogressB)));

      I do appreciate both of your assistance.

      I don't know why something so simple has to become so complicated.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #33
        Not a problem, good luck.

        In the end, the parentheses really don't make a difference. It was probably the e and chs that was screwing it up. The syntax he was using is used in SQL Server and possibly Oracle. However, Access doesn't understand what that means. It would have to be AS e and AS chs for that to work in Access.

        Comment

        • Rick Beach
          New Member
          • Jan 2011
          • 25

          #34
          Actually, his programming works. That was when I stated the query was running after 20 minutes. Once I used the full tables, yours also does the same. There are 29,051 records in the Equipment table and 47,318 records in the Equipment Requested table. Do you have any suggestions to make this run faster?

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #35
            Put indexes on EquipJ-tag#, CHSRNumber, InitiatedDate, and Status.

            Comment

            • Rick Beach
              New Member
              • Jan 2011
              • 25

              #36
              You are amazing.....

              Thanks

              Comment

              Working...