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 can use:
SELECT sum(if(voidreason>0,0,amt)) as sales FROM sdtik where acctno=1234 and datein>=20020615
to gather customers' sales totals. How can I setup a single query where the newdata.sales would be replaced with the summarized data from the select.
All help is greatly appreciated....
Patrick J. Shoaf, Systems Engineer <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
Midmon Internet Services, LLC 100 Third Street Charleroi, PA 15022 http://www.midmon.com Phone: 724-483-2400 ext. 105 or 888-638-6963 Fax: 724-489-4386
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]