[GENERAL] Problem merging two rows into same primary key

2005-05-23 Thread Patrik Kudo
s an easier way beacuase in the real scenario we're dealing with nearly 100 tables depending on that single one with the primary key... Thanks in advance, Patrik Kudo ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Problem merging two rows into same primary key

2005-05-24 Thread Patrik Kudo
Hi and thanks for your reply! Martijn van Oosterhout wrote: Now to the problem. We want to merge rows with id = 2 and id = 4 into id = 1 in the asdf table with the qwert table beeing updated to reflect the change. The desired result would yeild: Why doesn't: update quert set data = 1 where d

Re: [GENERAL] get certain # of recs

2001-09-14 Thread Patrik Kudo
f you need to sort in some way you could use something like select col1, col2, ... coln from tablename order by col1 limit 20 Regards, Patrik Kudo ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Patrik Kudo
select * from Apples where lower(color) like '%red%'; ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol Känns det oklart? Fråga på! On 9 Sep 2001, Michael Gay wrote: > If I am doing a command such as > > select * from Apples where color like '%red%'; > > how do I make it case i

[GENERAL] Thought on OIDs

2001-03-01 Thread Patrik Kudo
I worry? =) Regards, Patrik Kudo (I'm sorry if this becomes a repeated post. I tried to mail last night, but my subscription to the list wasn't registered at that time, so the mail didn't seem to get through)

Re: [GENERAL] problem with subselect: NOT IN

2001-04-02 Thread Patrik Kudo
you use "workorder". Is that where the fault is? You might also want to try the following: SELECT e.emp_id FROM employee e WHERE NOT EXISTS (SELECT 1 FROM salesorder s WHERE e.emp_id = s.emp_id) Regards, Patrik Kudo > Has anyone encountered this before? I know the second query

Re: [GENERAL] Yet another Performance Question

2001-04-18 Thread Patrik Kudo
Hi! I'm not 100% sure, but I think it would be much faster if you use COPY instead of INSERT when you read in a lot of data from a file. Regards, Patrik Kudo -- ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol Känns det oklart? Fråga på! On Wed, 18 Apr 200