Just to prove the theory that in VFP there are more ways to skin a fox;

SELECT CAST(ADDBS(field) AS C(50)) AS myfield

Sietse

-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Namens Paul Newton
Verzonden: dinsdag 23 oktober 2007 13:40
Aan: [EMAIL PROTECTED]
Onderwerp: Re: Enforce width of column returned from SQL SELECT

Thanks Peter - I suspected something like that.  In fact

SELECT padr(ADDBS(field),LEN(field)) AS myfield

works just fine !

Paul Newton

----- Original Message -----
From: "Peter Cushing" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: 23 October 2007 12:35:01 o'clock (GMT) Europe/London
Subject: Re: Enforce width of column returned from SQL SELECT

Paul Newton wrote:
> Hi all
>
> I have a table in which one field contains folder paths but if I do
something like this
>
> SELECT ADDBS(field) AS myfield .....
>
> the returned myfield column is much narrower than the original field width
and so the paths get truncated.  What is the best way to avoid this ?
>   
Try

SELECT padr(ADDBS(field),50) AS myfield  (or whatever width you want it)

Peter




[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL 
PROTECTED]@sw-software.nl
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to