Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4802

Not in with subquery does not work correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 9.0.5, 9.1.4
    • None
    • None

      Hi,

      This query does not return any results where it should.

      select cl.*
      from izalert_clientstatus cl 
      where cl.hostname not in (
      	select WSidentifier from prod_U_PV_PClist
      ) 
      

      This query is more or less equivalent to the one above but does return 28 results.

      select cl.hostname
      from izalert_clientstatus cl
      left join prod_U_PV_PClist pl on cl.hostname = pl.WSidentifier
      where pl.WSidentifier is null
      

      hostname and wsidentifier are both String fields. In the clientstatus table it has a length of 255, in the other table 63. The values for hostname and wsidentifier are e.g. 'COSARA4' and 'PC-10360'

            rhn-engineering-shawkins Steven Hawkins
            gadeynebram Bram Gadeyne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: