drex1116
12/19/2019 - 6:31 AM

sqlite

SELECT 
c.PrimaryKey AS id,
c.WarehouseID AS value, 
c.FirstName || " " || c.Surname || " - " || w.WarehouseIdentifier AS description
FROM NewBasedata_CRMUser AS c 
INNER JOIN NewBasedata_Warehouse AS w
ON c.WarehouseID = w.PrimaryKey
WHERE c.ServiceCenterID = '1225AE01-CE2D-11E9-9384-0050569D00C8'
AND c.FacilityID = 'ED625E04-CA4D-11E9-B2E0-0050569D00C8'
AND c.OrganisationUnitID = '708E85FE-CA4A-11E9-A57C-0050569D00C8'
AND c.WarehouseID IS NOT NULL