Re: [SQL] Invoice number

2000-12-21 Thread George Moga
e right at least twice a day. -- mrc > We are all of us living in the shadow of Manhattan. -- Watchmen I hope this can help ... Sorry for my poor english. George Moga, Data Systems SRL Slobozia, ROMANIA

[SQL] "SELECT" problem on 7.0.3

2001-01-11 Thread George Moga
and conditions) I have no problems with this "SELECT", it works (the biggest structure have 10.000 rows). Any sugestions ... ??? Thanks in advance and ... sorry for my english!! George Moga, Data SYSTEMS Srl Slobozia, ROMANIA

Re: [SQL] Selecting Current value from a sequence

2001-01-18 Thread George Moga
Try: SELECT last_value FROM sequence_name; > Regards, Najm For me works (PostgreSQL 7.0.3, Mandrake Linux 7.2). George Moga, Data Systems Srl Slobozia, ROMANIA

Re: [SQL] dates in functions

2001-03-05 Thread George Moga
BEGIN RETURN date_part(\'month\',$1::datetime); END; ' LANGUAGE 'plpgsql'; CREATE test=# select anyo_hidro('1-1-1999'); anyo_hidro 1 (1 row) I use: test=# select version(); version --

Re: [SQL] problem with copy command

2001-04-11 Thread George Moga
to delete the unique index testpri_pk ... but if you want to create the unique index again you must delete (or modify) you'r not_unique rows. George Moga, Data Systems Srl Slobozia, ROMANIA ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Select most recent record?

2001-05-16 Thread George Moga
query both "log" and "l1" for the same table: "log as l1"; 2. you use log.timestamp in () ... but in this case you have ony one value ... use "=" instead "in". == George Moga, Data Systems Srl Slobozia, ROMANIA P.S. Sorry for my english ... ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] how to add an new record from part of an old one

2001-05-17 Thread George Moga
2 int4, b3 varchar(32)); CREATE test=# insert into b (b1, b2, b3) select a1, a2, 'something else' from a where id = 1; INSERT 580468 1 test=# select * from b;  id |   b1    | b2 |   b3 +-++   1 | 1221211 | 12 | something else (1 row)   test=# I hope

Re: [SQL] set datestyle to European PROBLEM

2001-06-20 Thread George Moga
master start >/dev/null 2>&1" < /dev/null to su -l postgres -c "LC_ALL=C /usr/bin/pg_ctl -D $PGDATA -o '-i -o -e' -p /usr/bin/postmaster start >/dev/null 2>&1" < /dev/null and, after I connect my application to the database, the first command is: