Wenn ich die TAdvDBLookupCombobox richtig verstanden habe, kann ich in der Auswahl nur Strings anzeigen lassen. Also muss ich doch ein Integer zu einem String casten.
Edit:
Hier mal die komplette
SQL-Anweisung, vielleicht hilft es ja zum besseren Verständnis für mein Problem.
Code:
select facility.*,
province.AaLong as AaProvinceLong,
province.AaShort as AaProvinceShort,
province.AaCenter as AaProvinceCenter,
district.AaName as AaDistrictName,
country.AaLong as AaCountryLong,
country.AaShort as AaCountryShort,
facility_type.AaShort as AaFacilityTypeShort,
facility_type.AaLong as AaFacilityTypeLong,
(AaProvinceShort + AaFacilityTypeShort + cast(facility.AiCode as String)) as AaCode
from (facility
LEFT JOIN province
ON facility.AiProvince = province.SiProvince
LEFT JOIN district
ON facility.AiDistrict = district.SiDistrict
LEFT JOIN country
ON facility.AiCountry = country.SiCountry
LEFT JOIN facility_type
ON facility.AiFacilitytype = facility_type.SiFacilitytype
)
order by AaCode ASC;
Es geht dabei um den AiCode. Dieser soll immer vierstellig angezeigt werden.