X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 56E57B43965 for ; Mon, 7 Jul 2003 11:14:43 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 24395-09 for ; Mon, 7 Jul 2003 08:14:10 -0300 (ADT) Received: from bahama.vosn.net (bahama.vosn.net [205.214.72.216]) by svr1.postgresql.org (Postfix) with ESMTP id B66AAB430A6 for ; Mon, 7 Jul 2003 08:13:59 -0300 (ADT) Received: from gr.189.18.84.dial.global.net.uk ([80.189.18.84] helo=DELLPC) by bahama.vosn.net with asmtp (Exim 3.36 #1) id 19ZTwC-0005PI-00 for pgsql-sql@postgresql.org; Mon, 07 Jul 2003 05:13:41 -0600 Message-ID: <001c01c2fa9b$5b91ec80$03000000@DELLPC> From: "Ali Adams" To: Subject: help yourself by helping others Date: Fri, 4 Apr 2003 12:10:06 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0008_01C2FAA3.2184A6B0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bahama.vosn.net X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0] X-AntiAbuse: Sender Address Domain - doit4u.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/116 X-Sequence-Number: 14230 This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C2FAA3.2184A6B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear All, I am new to Relational Databases and SQL and my background in ODBs is cloud= ing my way to solving what seems to be a simple problem. I am sure many of = you have met it many times. OK, I have a table as follows: ID Machine Date Withdrawals 1 1 01/01/2003 1101 2 2 01/01/2003 2101 3 3 01/01/2003 3101 4 1 02/01/2003 1102 5 2 02/01/2003 2102 6 1 03/01/2003 1103 7 3 03/01/2003 3103 8 2 04/01/2003 2104 9 4 04/01/2003 4104 And i would like to create a monthly withdrawals report as follows: Machine Day1 Day2 Day3 Day4 ..........................................= .... Day31 1 11 12 13 0 = 0 2 21 22 0 24 = 0 3 31 0 33 0 = 0 4 0 0 0 0 = 0 Can you please help? Many thanks in advance. Ali www.geocities.com/aliadams ------=_NextPart_000_0008_01C2FAA3.2184A6B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear All,
 
I am new to Relational Databases and SQL a= nd my=20 background in ODBs is clouding my way to solving what seems to be a simple= =20 problem. I am sure many of you have met it many times.
 
OK, I have a table as follows:
 
 
ID Machine  =20 Date            = ;=20 Withdrawals
1 =20 1            &n= bsp;=20 01/01/2003    1101
2 =20 2            &n= bsp;=20 01/01/2003    2101
3 =20 3            &n= bsp;=20 01/01/2003    3101
 
4 =20 1            &n= bsp;=20 02/01/2003    1102
5 =20 2            &n= bsp;=20 02/01/2003    2102
 
6 =20 1            &n= bsp;=20 03/01/2003    1103
7 =20 3            &n= bsp;=20 03/01/2003    3103
 
8 =20 2            &n= bsp;=20 04/01/2003    2104
9 =20 4            &n= bsp;=20 04/01/2003    4104
 
And i would like to create a monthly withd= rawals=20 report as follows:
 
Machine   Day1  Day2 = =20 Day3  Day4 ..............................................=20 Day31
1           = ; =20 11      12     =20 13     =20  0          =20             &nb= sp;            =             &nb= sp;     0
2           = ;  21  =20    22     =20 0       =20 24            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;  =20 0
3           = ;  31     =20 0       =20 33      =20 0            &n= bsp;            = ;            &n= bsp;            = ;   =20 0
4           = ; =20  0       =20 0      =20 0       =20  0           &n= bsp;            = ;            &n= bsp;            = ;   =20 0
 
Can you please help?
 
Many thanks in advance.
 
Ali
<help yourself by helping=20 others>
www.geocities.com/aliadams
 
------=_NextPart_000_0008_01C2FAA3.2184A6B0--