Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select 'String is to long to fit' error message
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00820076
Message ID:
00820289
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform