Re: Replacing data in 1 table from another

2003-06-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-17 11:44:46 -0400: > At 05:14 PM 6/16/2003, Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2003-06-16 15:15:31 -0400: > >> I can use: > >> > >> SELECT sum(if(voidreason>0,0,amt)) as sales FROM sdtik where acctno=1234 > >> and datein>=20020615 > >> > >> to gather custo

Re: Replacing data in 1 table from another

2003-06-17 Thread Patrick Shoaf
I tired both statements you suggested. The update is what I would like to use, but I got an error, ERROR 1064: You have an error in your SQL syntax near ' sdtik set sales.sales ' I used the REPLACE command, but it had the effect of adding records for customers not in the statistics file.

Re: Replacing data in 1 table from another

2003-06-16 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-16 15:15:31 -0400: > I have two tables... > Table 1 newdata contains a lot of statistical data on our customers, > including last 12months sales amt. > table 2 sdtik contains all ticket information for all customers. > Both tables have acctno as primary key. > > I ca