G
Guest
I have an SQL query that I am combining text from multiple fields and then I
am trying to trim the last character but I must be doing something wrong.
Here is the SQL Query:
SELECT HM.Service_City, IIf([Site_Name]<>"",[Site_Name] & " • ","") &
IIf([Mailing Addr]<>"",[Mailing Addr] & " • ","") &
IIf([Street_Addr]<>"",[Street_Addr] & " • ","") &
IIf([Zip_Code]<>"",[Zip_code] & " • ","") &
IIf([Contact_Addr]<>"",[Contact_Addr] & " • ","") &
IIf([Contact_City]<>"",[Contact_City] & " • ","") &
IIf([Contact_Stt]<>"",[Contact_Stt] & " • ","") &
IIf([Contact_Zip]<>"",[Contact_Zip] & " • ","") & IIf([Phone1]<>"",[Phone1] &
" • ","") & IIf([Phone2]<>"",[Phone2] & " • ","") &
IIf([Toll_Free]<>"",[Toll_Free] & " • ","") & IIf(<>"",[URL],"") &
IIf(RTrim(" • "),"","") AS Expr1, HM.Number_of_Rooms, HM.Breakfast,
HM.Restaurant, HM.Lounge, HM.Pool, HM.Hot_Tub, HM.Handicapped_Access,
HM.Non_Smoking_Rooms, HM.Pets_Allowed, HM.Rates, HM.Major_Credit_Cards
FROM HM
ORDER BY HM.Service_City;
The problem is the with this: IIf(RTrim(" • ","","") It does not work, any
ideas what I'm doing wrong? Any help is appreciated. Thank you.
am trying to trim the last character but I must be doing something wrong.
Here is the SQL Query:
SELECT HM.Service_City, IIf([Site_Name]<>"",[Site_Name] & " • ","") &
IIf([Mailing Addr]<>"",[Mailing Addr] & " • ","") &
IIf([Street_Addr]<>"",[Street_Addr] & " • ","") &
IIf([Zip_Code]<>"",[Zip_code] & " • ","") &
IIf([Contact_Addr]<>"",[Contact_Addr] & " • ","") &
IIf([Contact_City]<>"",[Contact_City] & " • ","") &
IIf([Contact_Stt]<>"",[Contact_Stt] & " • ","") &
IIf([Contact_Zip]<>"",[Contact_Zip] & " • ","") & IIf([Phone1]<>"",[Phone1] &
" • ","") & IIf([Phone2]<>"",[Phone2] & " • ","") &
IIf([Toll_Free]<>"",[Toll_Free] & " • ","") & IIf(<>"",[URL],"") &
IIf(RTrim(" • "),"","") AS Expr1, HM.Number_of_Rooms, HM.Breakfast,
HM.Restaurant, HM.Lounge, HM.Pool, HM.Hot_Tub, HM.Handicapped_Access,
HM.Non_Smoking_Rooms, HM.Pets_Allowed, HM.Rates, HM.Major_Credit_Cards
FROM HM
ORDER BY HM.Service_City;
The problem is the with this: IIf(RTrim(" • ","","") It does not work, any
ideas what I'm doing wrong? Any help is appreciated. Thank you.