I think it will be better to add one more column for subtotal and
write an "on before insert" trigger to update the subtotal with sum of
total.
with regards,
S.Gnanavel
> -Original Message-
> From: [EMAIL PROTECTED]
> Sent: Thu, 16 Jun 2005 00:56:42 -0300
> To: pgsql-sql@postgresql.org
Hi Guys!
I need to make a complex query. I am thinking to use plpgsql BUT I am
confused how I can solve this.
What I have:
CREATE TABLE test
(
code varchar(15),
description varchar(60),
group varchar(10),
quant float8,
price float8,
total float8
)
WITHOUT OIDS;
INSERT INTO test (code, d
I have a client who wants to use Delphi as a front end to a Database, I
would like to use PostgreSQL over MSSQL and have been looking at the
psqlodbc project. Will psqlodbc connect with Delphi 6? Basically, I'm
wondering if anyone has experience with it? Any help will be appreciated.
Thanks,
J
Hi,
I'm querying a Postgres 8.0.3 database from Java via the 8.0-311 JDBC
driver. It mostly works. I ran into the "cursor does not exist" problem,
but was able to fix it with
connection.setAutoCommit(false);
Or so I thought.
There are several JSP pages which still throw the 'cursor "portal 1
PFC wrote on 15.06.2005 22:04:
It's not the program or Java. The same program takes about 20 seconds
with Firebird and the exactly same data.
Hm, that's still very slow (it should do it in a couple seconds like
my PC does... maybe the problem is common to postgres and firebird ?)
It's not the program or Java. The same program takes about 20 seconds
with Firebird and the exactly same data.
Hm, that's still very slow (it should do it in a couple seconds like my
PC does... maybe the problem is common to postgres and firebird ?)
Try eliminating disk IO by writing a
PFC wrote on 14.06.2005 14:26:
[...]
Now I fire up python, do a SELECT * from the table and retrieve all
the data as native objects... Hm, it takes about 1.3 seconds... on my
Pentium-M 1600 laptop...
Don't you have a problem somewhere ? Are you sure it's not swapping
? did you ch
On Wed, Jun 15, 2005 at 14:35:42 +0200,
Praveen Raja <[EMAIL PROTECTED]> wrote:
> Thanks. The UPDATE works ok now. But using the same logic it doesnt
> seem possible to delete rows. Is this also possible?
Yes. When you use table names in the where clause they are automatically
added to the join
On Wed, Jun 15, 2005 at 14:14:46 +0200,
KÖPFERL Robert <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
> I have currently trouble working with boolean values and variables in
> functions.
>
> As one would expect, a
> select '1'::bool, 't'::bool, 'true'::unknown::boolean
>
> works.
>
> As a select '1'
I don't know if you can do that using the same
logic.
Perhaps someone else can help?
For sure, you can use a
subselect.
delete from table1where col1 in (SELECT
a.col1
FROM table1 a JOIN table1 b ON a.col2 =
b.col2
WHERE a.col3 = something
AND
Thanks. The UPDATE works
ok now. But using the same logic it doesn’t seem possible to delete rows.
Is this also possible?
/P
-Original
Message-
From: Bruno Prévost
[mailto:[EMAIL PROTECTED]
Sent: 15 June 2005 14:22
To: Praveen Raja
Cc: pgsql-sql@postgresql.org
Subject: Re:
Try something like this
UPDATE table1SET col1 = b.col1FROM table1
bWHERE table1.col2 = b.col2 andtable1.col3 = something andb.col3 =
somethingelse
- Original Message -
From:
Praveen Raja
To: pgsql-sql@postgresql.org
Sent: Wednesday, June 15, 2005 7:39
AM
Subje
Hi,
I have currently trouble working with boolean values and variables in
functions.
As one would expect, a
select '1'::bool, 't'::bool, 'true'::unknown::boolean
works.
As a select '1' tells us this seems as a conversion unknown->bool
or ??maybe?? a boolean literal??
what-o-ever, at least my
Hi,
While using Ms SQL server I used to write update
statements like this,
UPDATE a SET a.col1 = b.col1
FROM table1 a
INNER JOIN table1 b
ON a.col2 = b.col2
WHERE a.col3 = ‘something’
AND b.col3 = ‘somethingelse’
But I can’t seem to do this in postgres, it
gives me an error
14 matches
Mail list logo