: Re: [SQL] Overlapping Ranges- Query Alternative
Hi,
the following works:
Create temp table ranges (Groups int, ColumnA int);
Insert into ranges Values(2,45);
Insert into ranges Values(3,15);
Insert into ranges Values(4,25);
Insert into ranges Values(5,35);
Select Groups,
Case
eas Gaab
Sent: Freitag, 12. November 2010 09:23
To: 'Ozer, Pam'; pgsql-sql@postgresql.org
Subject: Re: [SQL] Overlapping Ranges- Query Alternative
Hi,
the following works:
Create temp table ranges (Groups int, ColumnA int);
Insert into ranges Values(2,45);
Insert into range
2010 20:07
An: pgsql-sql@postgresql.org
Betreff: [SQL] Overlapping Ranges- Query Alternative
I have the following problem:
Create temp table ranges (Groups int, ColumnA int);
Insert into ranges
Values(2,45);
Select Groups,
Case when ColumnA between 0 and 19 then 0
when ColumnA >=20 then 20
I have the following problem:
Create temp table ranges (Groups int, ColumnA int);
Insert into ranges
Values(2,45);
Select Groups,
Case when ColumnA between 0 and 19 then 0
when ColumnA >=20 then 20
when ColumnA >=30 then 30
when ColumnA>=40 then 40
when ColumnA>=