Re: [SQL] Help with optional parameters

2006-09-21 Thread MaXX
solution wastes less cycles and is more readable... Snipet updated, Thanks, -- MaXX ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Help with optional parameters

2006-08-17 Thread MaXX
HTH, -- MaXX ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] generate_series to return row that doesn't exist in table...

2006-03-24 Thread MaXX
combination of subselects, joins, union,... and I never managed to get the result I wanted... I'm sure the solution is trivial but I don't get it... I prefer to generate missing rows on the fly intead of actually storing useless data on the table. Thanks for your help, -- MaXX

Re: [SQL] Merging lines with NULLs (with example data)

2005-10-27 Thread MaXX
Thank you, and sorry for the late answer, I was far away from a decent internet connection... I'll try both your solutions, EXPLAIN ANALYSE will elect the winner... In any case that will be cleaner than my dirty hack (2 distinct queries) which generate a lot of garbage... Thanks again, MaXX

[SQL] Merging lines with NULLs (with example data)

2005-10-24 Thread MaXX
' '2005-10-20','3','' '2005-10-21','','1' '2005-10-21','5','' into that: gday,count_udp,count_tcp '2005-10-20','3','2' '2005-10-21','5','1' in a single query??? Thanks in advance, MaXX Here's all the details: I have a table CREATE TABLE test ( id serial NOT NULL, tstamp timestamptz, host