Re: [SQL] COPY equivalent for updates

2008-07-15 Thread Decibel!
IN (SELECT real_table_id FROM temp_table); INSERT INTO real_table SELECT * FROM temp_table; COMMIT; Considering I've to deal with a where clauses anyway... when (and if) should I create an index on the id of temp_t1? t1 will contain 700-1M records while I may update a maximum of 20K a

Re: [SQL] Cross Tab Functions

2008-06-20 Thread Decibel!
#x27;, if.action_date) ORDER BY i.item_name, date_part('year', if.action_date); basically i changed the mon and the month to be year.. the system displayed something that i am not sure about. is there a command that converts the year similar to the mon Help again...Please -- Deci

Re: [SQL] How to manage category-ids as array-fields ?

2008-06-20 Thread Decibel!
Well, you can easily turn it into an array: SELECT string_to_array('1; 2', '; '); (You'll need to strip the trailing ;'s. After than you can convert the array to a recordset if you want. There's some examples in the archives of how to do that (I think

Re: [SQL] Speeding up schema changes

2007-09-19 Thread Decibel!
data you're storing (plus 4 bytes). Hrm, do we actually pad before storing? ISTM we should really do that the other way around... -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net