Don,
To amplify Rip's reply, the width for the column is set by the constant you use.
0 as num_field will give you a N(1) field,
00000 as num_field will give you a N(5), and
00000.00 as num_field will give you N(8,2).
ntom(0) as curr_field will give you Y.
' ' as char_field will give you C(1),
space(100) as char_field will give you C(100)
{ / / } as datefield will give you D(8) and
{ / / : : } will give you T(8)
In addition to these points, I'd suggest using brace delimiters for date fields so you don't get caught by strict date checking and CTOD.
Cheers,
Andrew
>select field1, field2, 0 as num_field, ' ' as char_field, ctod(' / / ') as datefield ;
>from mytable ;
>into table newtable
>
>>Hi All,
>>
>>In the foxpro help it mentions that you can create a new 'select_item' by using a constant but fails to give you
>>an example of how you do that. Can someone give me an example of a new numeric column initialized to zero for
>>a table built with an SQL statement ?
>>
>>Thanks,
>>
>>Don
If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?
From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."
All my FoxTalk and other articles are available on my
web site.
Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.