[SQL] exporting Excel tables into PostgreSQL database with Python

2005-12-13 Thread Jürgen Kemeter
Hi!   Here is a hopefully convenient description of my situation: - I have a main folder, containing several subfolders. - Every (sub)folder contains one or more .xls - Workbooks. - Every Workbook contains one or more different Spreadsheets. - The workbooks contain some cells which h

[SQL] lo function changed in PostgreSQL 8.1.1

2005-12-13 Thread Premsun Choltanwanich
Dear All,   I use '$libdir/lo' for manage my Large Object for PostgreSQL 8.0.4 . Now I try to up my PostgreSQL to new version as 8.1.1 but I think I got some error about lo (Large Object).   lo (Large Object) function that normally shown in function list now disappear.  I'm sure that I already ch

Re: [SQL] lo function changed in PostgreSQL 8.1.1

2005-12-13 Thread Tom Lane
"Premsun Choltanwanich" <[EMAIL PROTECTED]> writes: > lo (Large Object) function that normally shown in function list now = > disappear. I'm sure that I already check on Large Object box when I = > install. I found some information on http://www.postgresql.org/docs/8.1/int= > eractive/lo-interfac

[SQL] DB design and foreign keys

2005-12-13 Thread Gianluca Riccardi
hello all, i'm usign PostgreSQL 7.4.7 in a Debian 3.1 following is the SQL schema of my (very)small DB for a (very small)web business application: -- SQL schema for business-test-db CREATE TABLE customers ( customer_code serial, alfa_customer_code varchar(6), customer_name character var

Re: [SQL] DB design and foreign keys

2005-12-13 Thread John McCawley
Table orders defines the column order_code as a serial, which simple makes a trigger which gives a new value to the column on insert. Note that there is NO guarantee that ths column will be unique. You can manually update the value to whatever you want. If you wish this column to be unique,

Re: [SQL] DB design and foreign keys

2005-12-13 Thread Tom Lane
Gianluca Riccardi <[EMAIL PROTECTED]> writes: > CREATE TABLE orders ( >id serial, >order_code serial, >customer_code integer REFERENCES customers (customer_code) NOT NULL, >order_date time without time zone NOT NULL, >remote_ip inet NOT NULL, >order_time timestamp with time

Re: [SQL] DB design and foreign keys

2005-12-13 Thread Jaime Casanova
[...unnecesary...] > CREATE TABLE orders ( > id serial, > order_code serial, > customer_code integer REFERENCES customers (customer_code) NOT NULL, > order_date time without time zone NOT NULL, > remote_ip inet NOT NULL, > order_time timestamp with time zone NOT NULL, > order_type va

Re: [SQL] DB design and foreign keys

2005-12-13 Thread Richard Huxton
Gianluca Riccardi wrote: hello all, i'm usign PostgreSQL 7.4.7 in a Debian 3.1 CREATE TABLE orders ( id serial, order_code serial, ... PRIMARY KEY (id, order_code) ); CREATE TABLE order_items ( id serial, order_code integer REFERENCES orders (order_code) NOT NULL, when i try t

Re: [SQL] DB design and foreign keys

2005-12-13 Thread Scott Marlowe
On Tue, 2005-12-13 at 12:16, Gianluca Riccardi wrote: > hello all, > i'm usign PostgreSQL 7.4.7 in a Debian 3.1 > > following is the SQL schema of my (very)small DB for a (very small)web > business application: > CREATE TABLE orders ( >id serial, >order_code serial, >customer_code i

Re: [SQL] exporting Excel tables into PostgreSQL database with Python

2005-12-13 Thread Christian Kratzer
Hi, On Tue, 13 Dec 2005, Jürgen Kemeter wrote: Hi! Here is a hopefully convenient description of my situation: - I have a main folder, containing several subfolders. - Every (sub)folder contains one or more .xls - Workbooks. - Every Workbook contains one or more different Spreadsheets. - The wo

[SQL] # of 5 minute intervals in period of time ...

2005-12-13 Thread Marc G. Fournier
Is there a simpler way of doing this then: select (date_part('epoch', now()) - date_part('epoch', now() - '30 days'::interval)) / ( 5 * 60 ); Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: [EMAIL PROTECTED] Yahoo!: yscrappy

[SQL] Multi-row update w. plpgsql function

2005-12-13 Thread Daniel Hertz
Given a set of checkbox values that are submitted through an html form, how do you loop through the submitted values to update more than one row in a table? Imagine a table called 'message_table': mid | message | status +-+--- 1 | Text1 | H 2 | Text2 | H 3 | Text

Re: [SQL] Multi-row update w. plpgsql function

2005-12-13 Thread Owen Jacobson
Daniel Hertz wrote: > Given a set of checkbox values that are submitted through an > html form, > how do you loop through the submitted values to update more > than one row > in a table? > > Imagine a table called 'message_table': > > mid | message | status > +-+--- > 1 |

Re: [SQL] Multi-row update w. plpgsql function

2005-12-13 Thread Aaron Koning
Owen makes a good point. Check that you are using the [] in the HTML input variable for the checkboxes. Like: 1 2 3 4 AaronOn 12/13/05, Owen Jacobson <[EMAIL PROTECTED]> wrote: Daniel Hertz wrote:> Given a set of checkbox values that are submitted through an> html form,> how do you loop t

Re: [SQL] lo function changed in PostgreSQL 8.1.1

2005-12-13 Thread Premsun Choltanwanich
Dear Tom,   I'm not sure that I understand your word correctly.   But I will explain more information   I just need to keep my member's picture into database for showing and may have update sometime. I code my program with VB6. I found some suggestion to manage lo about lo_in and lo_out that why.

Re: [SQL] exporting Excel tables into PostgreSQL database with Python

2005-12-13 Thread Achilleus Mantzios
O Christian Kratzer έγραψε στις Dec 13, 2005 : > Hi, > > On Tue, 13 Dec 2005, Jόrgen Kemeter wrote: > > Hi! > > > > Here is a hopefully convenient description of my situation: > > - I have a main folder, containing several subfolders. > > - Every (sub)folder contains one or more .xls - Workbooks.