Re: [GENERAL] Getting the count(*) from two tables and two date ranges in same query

2008-01-30 Thread Håkan Jacobsson
t part: from table2, table3 where table2.id = table3.id and table2.id = n; I think I need the UNION statement instead? Håkan Jacobsson - System Developer RELEVANT TRAFFIC EUROPE AB, Riddarg 17D, SE-114 57 Sthlm, Sweden Mobile (+46)

Re: [GENERAL] Getting the count(*) from two tables and two date ranges in same query

2008-01-30 Thread Håkan Jacobsson
ch is the count I want.) Might be some problem with the case statement? Or with the from table2, table3 where table2.table1id = table3.table1id part? Very grateful for help! Håkan Jacobsson - System Developer RELEVANT TRAFFIC E

Re: [GENERAL] Getting the count(*) from two tables and two date ranges in same query

2008-01-29 Thread Håkan Jacobsson
Adam, Big thanx - I'll try this out! Håkan Jacobsson - System Developer RELEVANT TRAFFIC EUROPE AB, Riddarg 17D, SE-114 57 Sthlm, Sweden Mobile (+46) 736 56 97 58 Direct (+46) 8 56 24 98 05 Phone to office (+46) 8 678

Re: [GENERAL] Getting the count(*) from two tables and two date ranges in same query

2008-01-28 Thread Håkan Jacobsson
Hi Adam and all, I don't get it=). How do I input the second daterange in this query? Also, I have the ID from table1. Its known in the query. Wouldn't I need to use a UNION for this kind of query? Håkan Jacobsson - System

[GENERAL] Getting the count(*) from two tables and two date ranges in same query

2008-01-28 Thread Håkan Jacobsson
= Y count(*)_from_table3_between_fromdate1_and_todate1 = Z count(*)_from_table3_between_fromdate2_and_todate2 = V Is this possible? /Best regards, Håkan Jacobsson - System developer in Sweden Håkan Jacobsson - System Developer

Re: [GENERAL] SQL for Deleting all duplicate entries

2007-09-09 Thread Håkan Jacobsson
ns and Scotts solutions tomorrow. Anyone know if I need to modify Merlins and/or Scotts solutions to solve this new situation? /best regards, Håkan >Ursprungligt meddelande >Från: [EMAIL PROTECTED] >Datum: 09-09-2007 15:42 >Till: "Håkan Jacobsson"<[

Re: [GENERAL] SQL for Deleting all duplicate entries

2007-09-09 Thread Håkan Jacobsson
Merlin, Its just about three columns - not any column. Two columns are varchars and the third is a date. The date column value is NULL for the rows for which I want to delete the duplicates. Yes, please, be a bit more specific! /regards, Håkan Jacobsson >Ursprungligt meddela

[GENERAL] SQL for Deleting all duplicate entries

2007-09-05 Thread Håkan Jacobsson
;, column3 = 'hey' and column4 IS NULL for several rows in the table. I want to keep just one of those rows. Is this possible? I can't figure it out, so any help MUCH appreciated! /regards, Håkan Jacobsson - System developer at Relevant Traffic, Sweden ---

[GENERAL] [JDBC] Restore database from zipped textfile (.sql) created by pg_dumpall

2007-08-09 Thread Håkan Jacobsson
Hi, The table indexes aren't restored when I run this command: gunzip -c /filename/.gz | psql dbname / Should I use another cmd? Or am I missing a parameter? /regards, Håkan Jacobsson ---(end of broadcast)--- TIP 1: if posting/reading th