>I need to write to a .txt but I can not just use "copy to type", because I need more control over the txt file.
>
>
> I have two tables: maintable.dbf and item.dbf and I need something as below:
>
>
>open my.txt file
>
> use table 1
>
> scan
>
> write: field1 + "|" + field2 + "|" + field3
>
> in the next line
>
> write: field4 + "|" + field5 + "|" + field6
>
>use item
> scan for condition
>
>write: field1 + "|" + field2
>
> in the next line
>
> write: field3 + "|" + field4
>
>endscan
> endscan
>
Hi Moises,
TEXTMERGE makes this pretty easy:
SELECT Table1
SET TEXTMERGE ON NOSHOW
SET TEXTMERGE TO MyFile.txt
SCAN
\<<field1>>|<<field2>>|<<field3>>
ENDSCAN
SET TEXTMERGE OFF
SET TEXTMERGE TO