Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP5 Select Query
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00388246
Message ID:
00388248
Views:
10
You could return a 120-char string from your MuFunc(). The only problem I could see would be your numeric field.

Alternatively, you can union a template select.

Select Space(Len(fld1)) As fld1, Space(120) As myfld2, 00000 as newfld3 ...
Union
Select fld1, myfunc(fld2), 123 as newfld3 from ...

You could set up a dummy cursor to do the first select from that has the desired structure. Both select statements must have the same fields in the same sequence.

>How do a set the field width in a select statement. I'm probably being particularly obtuse this morning, but I can't find it in the docs.
>
>fld1 & fld2 are character fields
>myfunc returns a variable length string
>
>select fld1, myfunc( fld2 ) as myfld2, 123 as newfld3 from .......
>
>I want myfld2 to be 120 chars & newfld3 to be numeric width 5 no dp.
>
>Any help would be appreciated.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform