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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to update a table from another table each night 3

Status
Not open for further replies.
Jan 20, 2007
237
0
0
US
Hi everyone, looking for some help,

i have to tables with the same structure, one it is updated during the day, by the data entry person and i want to update the second one at nite from a batch file, so then i can use the one updated at nite in another application, i have my own reasons.

1-TENG_XREF.DBF gets update during working hours
2-TENG_SHTD.DBF, needs to get updated from TENG_XREF at nite from a batch file, that calls and exe file

so this is what i have in the prg file that later i built as an exe file, by the way can anyone point to me why the new records in TENG_XREF , does not appears on TENG_SHTD or why this last dbf do not get updated from TENG_XREF ? what is wrong in the Select sql ?
Code:
USE TENG_SHTD  IN 0
SELECT JOB_NO, SHT, LAYOUT, DESCRIP, cust_name FROM TENG_XREF WHERE LAYOUT NOT IN(SELECT LAYOUT FROM TENG_SHTD)  INTO CURSOR JUNK ORDER BY 1,2,3
SELE TENG_SHTD 
APPEN FROM DBF('JUNK')
CLOSE TABLE
close all
quit

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top