Brenda,
You can do that with one select
select *, PADR(m.lettername,50) as lettername ;
from property ;
where key = m.key ;
INTO TABLE (cdatasource)
>I am trying to create a copy of a table structure, but to add a column on the end with a constant value.
>
>The following code seems to create the l_prop1.dbf table that is a copy of the property table structure with a column at the end named lettername. The 'into arr_prop' appears to create an array with the lettername value as the last element of the array. But when I 'append from', to the newly create table l_prop1, a date gets put into the lettername column. The previous two columns to lettername are both date types that should have values in them, but they are blank. Where does the following code go wrong. Will not a STRUCT return the column in the same order as a 'into array'.
>
>cdatasource = rpath + '\DATA\L_prop1.DBF'
>SELECT property
>COPY STRUCTURE TO (cdatasource)
>alter table (cdatasource) add column lettername c(50) not null
>select *, (m.lettername) as 'lettername' from property where key = m.key into array arr_prop
>select l_prop1
>append from array arr_prop
>
>Thanks
>
>Brenda
--sb--