HomeActive Query BuilderCriteria Builder

Criteria Builder


I'm having a problem with the criteria. I want to enter IN ('FLAB','PLAB') as my criteria and it doesn't work.
I don't see anything in the user guide. Will you be implementing a criteria builder/wizard?
Kelly O | email
June 30 2009, 04:28 PM
I got it to work. The tip on writing the sql first to see how in parsed worked.

SELECT lab.hlsys.Locations_Sys.Location_code AS LOC,
lab.hlsys.Locations_Sys.Name AS LOC_NAME, lab.hlsys.Locations_Sys.Delete_flag
AS L_ACT, lab.hlsys.Departments.Dept_code AS DEPT, lab.hlsys.Departments.Name
AS DEPT_NAME, lab.hlsys.Workstations.Department AS D_ACT,
lab.hlsys.Workstations.Station_code AS WRKST,
lab.hlsys.Workstations.Station_name AS WRKST_NAME,
lab.hlsys.Workstations.Delete_flag AS W_ACT
FROM lab.hlsys.Locations_Sys LEFT JOIN
lab.hlsys.Departments ON lab.hlsys.Locations_Sys.Location_code =
lab.hlsys.Departments.Location LEFT JOIN
lab.hlsys.Workstations ON lab.hlsys.Departments.Dept_code =
lab.hlsys.Workstations.Department
GROUP BY lab.hlsys.Locations_Sys.Location_code, lab.hlsys.Locations_Sys.Name,
lab.hlsys.Locations_Sys.Delete_flag, lab.hlsys.Departments.Dept_code,
lab.hlsys.Departments.Name, lab.hlsys.Workstations.Department,
lab.hlsys.Workstations.Station_code, lab.hlsys.Workstations.Station_name,
lab.hlsys.Workstations.Delete_flag
HAVING lab.hlsys.Locations_Sys.Location_code IN ('PLAB', 'FLAB')
ORDER BY lab.hlsys.Locations_Sys.Name, lab.hlsys.Departments.Name,
lab.hlsys.Workstations.Station_name
Kelly O | email
14 mins since original post
This topic is closed