Subject Re: copy to <file> fields
From WJS <warra@nowhere.com>
Date Tue, 21 Feb 2017 04:45:07 +0200
Newsgroups dbase.getting-started

On 2017/02/21 12:11 AM, Theo Scheffers wrote:
> .........
> use exclusive SYN_naam
> // browse field casnr, naam3/80, naam/80, handel15/60,  handel16/60,  handel17/60,  handel18/60,  handel19/60
> SET filter TO isblank(handel16)=false
> go top
> copy to SYN_handel16 fields casnr,naam, handel16
>

My two cents
You don't say which dBase version you use but since local SQL is
available since dBase IV for dos, my suggestion is you familiarize
yourself with local SQL commands.
In my view it is very powerful and it will also later be of a big help
whenever you want to move your app to a newer dBase version.

Try the following and see if it does what you want.
1)
(the below SQL statement should be in one line)
select casnr, naam3, naam, handel15, handel16, handel17, handel18,
handel19 from SYN_naam
browse

This should open a browse with all the fields named as above.
When closing the browse window, don't forget to issue command:
   close table
else the table will stay open in memory.

If the named fields are all the fields in the SYN_naam table, you can
shorten the SQL command as follows:
select * from SYN_naam
browse

The '*' in SQL indicates all fields

2)
To copy certain fields filtered to a specific criteria and save it to a
new table, you can use the following SQL statement using the 'where'
clause for the filter:
(again, the below should be in one line)
select casnr, naam, handel16 from SYN_naam where (handel16 IS NOT NULL
OR handel16 <> " ") save to SYN_handel16

The filter portion between the brackets is to cater for both cases where
the field could either be NULL or just empty where the field once had a
value and was just deleted to be empty.

Wian