Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC returning padded field as memo
Message
 
 
To
12/01/2007 11:06:16
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01185051
Message ID:
01185052
Views:
14
This message has been marked as the solution to the initial question of the thread.
Use CAST() or PADR() function.

>I am running the following line of code in vfp to return a sqlserver record set
>
>SQLEXEC(MAIN_DATA_SOURCE,"SELECT REPLICATE(' ', (8 - LEN(ltr_name))) + ltr_name AS paddedlettername,ltr_desc FROM Ltrfile",'testcursor')
>
>when the cursor is returned the field paddedlettername is data type memo instead of character.
>
>now when I run it again with the follwing code
>
>SQLEXEC(MAIN_DATA_SOURCE,"SELECT REPLICATE(' ', (8)) + ltr_name AS paddedlettername,ltr_desc FROM Ltrfile",'testcursor')
>
>the paddedlettername field is of type character.
>Does anyone know why and is there a way I could get it to return as character while still including the LEN function ?
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform