Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ICASE cutting String
Message
From
12/10/2021 09:20:37
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01682487
Message ID:
01682491
Views:
40
>Hello comunity,
>
>I have VFP Cursor named mybolist with character field payment.
>Then i need to select this cursor into a new cursor to create condition on payment Field.
>
>
>select payment from mybolist
>The Result is PAYPAL
>
>When i write this new cursor:
>select  Icase(payment='MB', 'MB', payment='CC', 'VISA', payment='PAYPAL','PAYPAL') as 'Payment'  into cursor Mycrs Readwrite
>The result is PA  ??
>
>
>To solve this problem i rewrite like this:
>
>select  Icase(payment='MB', 'MB    ', payment='CC', 'VISA  ', payment='PAYPAL', 'PAYPAL') as 'Payment'  into cursor Mycrs Readwrite
>The result inow is  PAYPAL
>
>
>
>
>
>I deduced that the result must have the length of the string with more characters, why !?
>
>Many thanks,
>Luis Santos

This not is bug but feature sice FP 2.0.
SQL engine analyse result from "first" row for identifying data types and size for each field from result.
First result is 'MB' - C(2)
Second result is 'MB ' - C(6)

MartinaJ

Hello Martina,

Many thanks for your reply.

Best regards,
Luis Santos
Previous
Reply
Map
View

Click here to load this message in the networking platform