Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can I combine two files??

Status
Not open for further replies.

StanKorn

Technical User
Mar 28, 2002
72
US
I have 2 DBF files that have exactly the same structure and indexing. One file is historic and the other is current. The only difference between the 2 is current has activity that is for unclosed periods or an invoice is still in unpaid status.
Can combine these 2 files in a report writer (Crystal v8.5) into a single file and then generate my output. Utilizing two files returns invalid data.
Does anyone have any thoughts on this?
thanx,
stan


Remember - only dead fish go with the flow.
 
StanKorn (TechnicalUser)

How about creating a cursor and joining the two tables using union?
Code:
SELECT * from table1 UNION SELECT * FROM TABLE into cursor myResult

And create your report based on the resulting cursor.

Or open both tables and in table 1 append from table 2.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
SELECT file1
APPEND FROM file2

You now have 1 combined file called file1.

Jim
 
Thanks for your help. I don't know if I can do the union or the select /append onthis - I have VFP 6 but the vendor has written the app in VFP 7. Please tell me that makes no difference :)


Remember - only dead fish go with the flow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top