Hello Sergey,
Thank you for the help. I wasn't familiar with the "PADR" function and appreciate your bringing it to my attention.
Also, it was kind of you to make my select more efficient, it works great and with a lot less mess...
Thanks much,
Jim Harvey
>Hi James,
>
>I think that the lengh of the string created by your IIF statement exceeds 254 character limit on the field lenght. You sould always use PADR() function on character expressions in select to make sure that they are of proper lenght. You can also simplify you expression as follows
SELECT PADR(trim(name) + " " + ;
> IIF( NOT EMPTY(location), "(" + trim(location) + ") ", " ") + ;
> trim(detail) + ;
> IIF( NOT EMPTY(rx), " Rx- " + trim(rx), ""), 254) as mdetail ;
> from hshealth