[SQL]

2001-01-03 Thread Sangeeta Bhatnagar
please remove my mail id from the mailing list. my mail id : [EMAIL PROTECTED] __ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup

Re: [SQL] Weird problem with script...

2001-01-03 Thread Richard Huxton
- Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, January 03, 2001 1:02 AM Subject: Re: [SQL] Weird problem with script... > [EMAIL PROTECTED] writes: > > I'm building a script to create the tables in my database.

[SQL] how to build this query ??? Please help !!!

2001-01-03 Thread juerg . rietmann
Hello there I have a problem, building a query. Who can help ? I use postgreSQL 7.0.3. Thanks for any help and suggestions ... jr orders a_nr ¦ product ¦ state - 11 ¦ tp ¦ 12 ¦ fi ¦ 13 ¦ tp ¦ 14 ¦ ok ¦ 15 ¦ dm ¦

Sv: [SQL] how to build this query ??? Please help !!!

2001-01-03 Thread Nikolaj Lundsgaard
Something like this oughtta work (not tested) SELECT a_nr, (SELECT count(*) FROM cylinders WHERE z_a_nr = a_nr) AS #cylinder, (SELECT count(*) FROM cylinders WHERE z_a_nr = a_nr AND z_status = 'zdr') AS #zdr, (SELECT count(*) FROM cylinders WHERE z_a_nr = a_nr AND z_status = 'zcu') AS #zcu, (SEL

[SQL] PL/pgSQL: recursion?

2001-01-03 Thread Albert REINER
Saluton, is there any possibility to do recursion in plpgsql-functions? Here is what I tried (I know that I can do it with a simple loop, of course; I am just curious about what one can or cannot do in plpgsql): ,[ test-recursion ] | drop table ttt; | create table ttt | ( id int4, | pi

[SQL] Ensuring primary key is referenced at least once upon commit

2001-01-03 Thread Albert REINER
Saluton, suppose we have PostgreSQL 7.0.2 and two tables, a and b, like: a: id serial primary key ... b: a int4 not null references a(id) ... In general there will be several rows in b with the same b.a, but how can I make sure there is AT LEAST ONE row referencing a given id from table

[SQL] Support for arrays in PL/pgSQL

2001-01-03 Thread Albert REINER
Saluton, does anyone know whether there is any support at all for arrays in PL/pgSQL? Thanks in advance, Albert. -- -- Albert Reiner <[EMAIL PROTECTED]> Deutsch * English

RE: [SQL] order by day or month, etc

2001-01-03 Thread Francis Solomon
Hi Leo, to_char() definitely works on my system (pg 7.02) so I'm not quite sure whether you're using an older version or whether something else is wrong. You can find more documentation on the function here: http://www.postgresql.org/devel-corner/docs/postgres/functions-formattin g.htm Whether y

Re: [SQL] PL/pgSQL: recursion?

2001-01-03 Thread Tom Lane
"Albert REINER" <[EMAIL PROTECTED]> writes: > is there any possibility to do recursion in plpgsql-functions? Recursion works fine ... but an infinite recursion, such as you have here, will quickly overflow the available stack space and cause the backend to crash. You're invoking idPath with the

RE: [SQL] Numeric and money

2001-01-03 Thread Francis Solomon
Hi Michael, >create table tst (id int, amount numeric(9,2)); >insert into tst values (1, 1.10); >insert into tst values (2, 1.00); >insert into tst values (2, 2.00); >select * from tst where amount = 1; -- works >select * from tst where amount = 1.1

[SQL] Numeric and money

2001-01-03 Thread Michael Davis
Hello Everyone, I am in the process of migrating my Access97 application to PostgreSQL. So far everything looks great with one exception. I converted my currency fields in Access to numeric(9,2) as recommended in the PostgreSQL documentation. Many things to don't play well with the numeric

[GENERAL] Re: [SQL] Numeric and money

2001-01-03 Thread Tom Lane
[ mail lists trimmed to something a tad more reasonable ] Michael Davis <[EMAIL PROTECTED]> writes: > From within Access, I can't update any table with a numeric data type > because of the "select * from tst where amount = 1.1;" failure. Yeah. The problem here is the conflict between interpret

Re: [SQL] sql99 / sql3

2001-01-03 Thread Tom Lane
Ron Peterson <[EMAIL PROTECTED]> writes: > What organization is currently responsible for drafting SQL standards? ISO. > How can I obtain publications describing those standards? Is there > anything comprehensive and definitive online? In the US you can buy ISO standards from ANSI, see http:/

[SQL] postmaster: address already in use

2001-01-03 Thread Markus Wagner
Hi, my postmaster suddenly begins to make problems. It was running fine, but then: FATAL: StreamServerPort: bind() failed: Address already in use Is another postmaster already running on that port? If not, remove socket node (/tmp/.s.PGSQL.5432) and retry. /sys/svr/pgs/bin/postma

Re: [SQL] postmaster: address already in use

2001-01-03 Thread Tom Lane
Markus Wagner <[EMAIL PROTECTED]> writes: > my postmaster suddenly begins to make problems. It was running fine, but > then: > FATAL: StreamServerPort: bind() failed: Address already in use > Is another postmaster already running on that port? > If not, remove socket node (/tmp/.s.

Re: [SQL] Numeric and money

2001-01-03 Thread Karel Zak
> Date: Wed, 3 Jan 2001 11:11:36 -0700 > From: Michael Davis <[EMAIL PROTECTED]> !> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, !> "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, !> "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, !> "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > Subject: [S

Re: Sv: [SQL] how to build this query ??? Please help !!!

2001-01-03 Thread Jens Hartwig
> [...] > SELECT a_nr, > (SELECT count(*) FROM cylinders WHERE z_a_nr = a_nr) AS #cylinder, > [...] > FROM orders > [...] Is this a documented feature? Where can I find more information about this? I do not want to join the actual discussion about documentation of PostgreSQL but I never before h

Re: Sv: [SQL] how to build this query ??? Please help !!!

2001-01-03 Thread Tod McQuillin
On Thu, 4 Jan 2001, Jens Hartwig wrote: > > SELECT a_nr, > > (SELECT count(*) FROM cylinders WHERE z_a_nr = a_nr) AS #cylinder, > > [...] > > FROM orders > > Is this a documented feature? Where can I find more information about > this? I do not want to join the actual discussion about documentat