![]() |
|
#1
|
|||
|
|||
SQL-Additional fieldsa)SQL-Additional fields
Hi - hopefully this is an easy query for any experts out there! I need to query a Microsoft Access database with the following fields Field 1-Invoice_Date Field 2-OrderNo Field 3-CustomerName Field 4-Invoice_Amount 1)Can I extract CustomerName, Invoice_Amount and OrderNo where the Invoice_Date is more than 30 days and 60 days old (overdue from date of invoice) as below: CustomerName |OrderNo | > 30 DYS | > 60 DYS | Total --------------------------------------------------------- ShopMart |A1200 | 2,000 | 100 | 2,100 Handyware |CF002 | 5,200 | 200 | 5,400 --------------------------------------------------------- | Total | 7,200 | 300 | 7,500 ================================================== ======= b)SQL-Query Access by Date I need to query a Microsoft Access database with the following fields Field 1-Date Field 2-ItemCode Field 3-Stock_In_qty Field 4-Stock_Out_qty 1)Can I extract the following info that has an additional field that display the quantity balance as below: Date | ItemCode | Stock_In_qty | Stock_Out_qty | *Bal_qty ------------------------------------------------------------------ 12/10/2003 | A100 | 20 | 0 | 20 25/10/2003 | A100 | 0 | 10 | 10 29/10/2003 | A100 | 15 | 0 | 25 10/11/2003 | A100 | 0 | 10 | 15 12/11/2003 | A100 | 2 | 0 | 17 22/11/2003 | A100 | 0 | 5 | 12 02/12/2003 | A100 | 20 | 0 | 32 30/12/2003 | A100 | 0 | 2 | 30 16/01/2004 | A100 | 20 | 0 | 50 05/02/2004 | B100 | 150 | 0 | 150 17/02/2004 | B100 | 0 | 50 | 100 2)Can I extract the following info that show the monthly *stock balance as below: Period Oct03 | Nov03 | Dec03 | Jan04 | Feb04 | Total ------------------------------------------------------------ ItemCode A100 25 | 12 | 30 | 50 | 0 | 117 B100 0 | 0 | 0 | 0 | 100 | 100 ---------------------------------------------- 25 | 12 | 30 | 50 | 100 | 217 ============================================== *Note:stock balance is the quantity balance at the end of each month can anyone help? Thanks From |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Easy SQL query | jlee | MySQL / PHP Forum | 1 | 22-Jul-2004 07:15 |
| SQL multiple languages query | samtediou | MySQL / PHP Forum | 6 | 23-Jul-2003 13:09 |
| Thanx for the sql query, but there must be a little mistake | norok | MySQL / PHP Forum | 13 | 30-Jun-2003 06:30 |
| mysql vs sql - what is the difference | zabell | MySQL / PHP Forum | 2 | 14-Jun-2003 16:32 |
| Difference between MySQL and SQL | pcxgamer | MySQL / PHP Forum | 2 | 14-Apr-2003 12:07 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The