3 Replies Latest reply: Dec 11, 2014 12:33 AM by anbu cheliyan RSS

    SQL Join in QlikView

      Hi all,

       

      I know there are a number of posts around this, however, nothing seems to answer my question directly. I am trying to join 4 tables (my data source is a mess, but I can't do much about it) using the below SQL statement, however, when I go and run it in QlikView I get the following error in my log: Field not found: <TypeID>

       

      I am not sure where to go at this point. I have bolded and underlined where I think the script is failing. Any thoughts would be helpful.

       

      SELECT PersonID, Date, li.TypeID as LaborTypeID, LocID, Qty, Amt, lt.ID as LaborTypeID,

           lt.SiteID, lt.Type, Code, Label, lt.ItemID, StandardType, lp.ID, lp.SiteID asEmpSiteID,

           EmpID, Name, lp.Type as LaborPersonType, Status, BadgeID, lp.ItemID as EmpItemID,Address1,

           Address2, City, State, Zip, Phone, Email, SSN, PayType, MaritalStatus, DateBirth,DateStart,

           DateStop, DateModified,NumOfExemptsPersonal, NumOfExemptsOther, IsRehireable,StopReason, it.itemID,

           PID, it.TypeID, itemGLAcct

       

      FROM LaborItems li, LaborTypes lt, LaborPerson lp, Items it

      where  li.TypeID = lt.ID

                   and li.PersonID = lp.ID

                   and lt.itemID = it.ItemID

                   and date > '2014-11-01'