Re: [GENERAL] INSERT with SELECT not working in pgAdmin

2010-09-21 Thread Stefan Wild
Ok I found the solution. I have to use the UPDATE command and not the INSERT: UPDATE c_transactions SET timestamp = entrytimestamp and than: UPDATE c_transactions SET timestamp = exittimestamp WHERE exittimestamp IS NOT NULL -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] INSERT with SELECT not working in pgAdmin

2010-09-21 Thread Stefan Wild
> Hey Stefan, > > The sounds like you have a field "id" in you "c_transactions" without > default value (which usually should be nextval('some_sequence'::regclass). > Do you create a sequence for "c_transactions"."id" ? > Hi Dmitriy, yes it's right, the id column does not have a default value

[GENERAL] INSERT with SELECT not working in pgAdmin

2010-09-20 Thread Stefan Wild
Hi guys, I'm trying to merge two tables to one with INSERT and SELECT commands: INSERT into c_transactions (timestamp) SELECT entrytimestamp from c_transactions INSERT into c_transactions (timestamp) SELECT exittimestamp from c_transactions But getting this error on execution (in pgAdmin): "ER

Re: [GENERAL] Empty SELECT result at simultaneous calls

2010-09-09 Thread Stefan Wild
> Is this freshly inserted data you're having issues with? > > If so, I suspect you're running into issues where the data > has been written in another transaction but that transaction > has not yet committed. The data is **NOT** visible to other > transactions until the writing transaction commi

Re: [GENERAL] Empty SELECT result at simultaneous calls

2010-09-08 Thread Stefan Wild
> Excerpts from Stefan Wild's message > of miƩ sep 08 11:40:25 -0400 2010: > > Hello, > > > > as already stated: "When I'm working with delays in > the servlets, everything works fine." the same selects on > the same id work fine if delayd. So the data should not be > the problem. > > So why are

Re: [GENERAL] Empty SELECT result at simultaneous calls

2010-09-08 Thread Stefan Wild
Hello, as already stated: "When I'm working with delays in the servlets, everything works fine." the same selects on the same id work fine if delayd. So the data should not be the problem. regards, Stefan Wild --- Tom Lane schrieb am Mi, 8.9.2010: > Von: Tom Lane >

[GENERAL] Empty SELECT result at simultaneous calls

2010-09-07 Thread Stefan Wild
Hello guys, I have a problem with my web application and postgres. I have several servlets on a page which results in severeal simultaneous data base calls kind of: SELECT d.id, d.aa, d.ab, ts.ac, d.ad, d.af, d.ag, d.ah, d.ai, d.aj, d.ak, d.al, d.am, d.an, d.ao, d.ap, d.ar, d.as, d.at, d.au, d

Re: [GENERAL] Wrong "ORDER BY" on a numeric value result

2010-08-16 Thread Stefan Wild
; An: pgsql-general@postgresql.org > Datum: Sonntag, 15. August, 2010 10:43 Uhr > Stefan Wild wrote on 15.08.2010 > 10:36: > >> column is numeric, but upper() works on text, and > returns > >> text, so your > >> numeric column got casted to text by using upper &

Re: [GENERAL] Wrong "ORDER BY" on a numeric value result

2010-08-15 Thread Stefan Wild
Thank you guys! That was the point. --- hubert depesz lubaczewski schrieb am So, 15.8.2010: > Von: hubert depesz lubaczewski > Betreff: Re: [GENERAL] Wrong "ORDER BY" on a numeric value result > An: "Stefan Wild" > CC: pgsql-general@postgresql.org > Datum:

[GENERAL] Wrong "ORDER BY" on a numeric value result

2010-08-14 Thread Stefan Wild
Hello guys, I have following sorting problem and need your help. When executing this SELECT statement: "SELECT d.id, d.name, d.description, ts.name, d.opentimestamp, d.initialvalue,d.plmoney, d.per