Re: How do I make a view with multiple "count" arguments

From: Mike Dwyer <dwyermj_at_co,larimer.co.us>
Date: 2000/07/27
Message-ID: <VHXf5.2$ZU2.519_at_wdc-read-01.qwest.net>#1/1


Let's modify this a bit:

Select count(*) col_1, 0 col_2, 0 col_3 from taba where union
select 0, count(*), 0 from tabb where
Union
select 0, 0, count(*) from tabc where
Union
......

"TimKArnold" <timkarnold_at_aol.com> wrote in message news:20000726214702.08102.00000113_at_ng-bh1.aol.com...
> Sure,
> create or replace view myview as
> Select count(*) alias1 from taba where
> union
> select count(*) alias2 from tabb where
> Union
> select count(*) alias3 from tabc where
> Union
> ......
>
> So, when you select * from myview
> you get the counts.
>
>
>
>
> >Hello,
> > I'm trying to get a view that has multiple columns which are "count
> >(*)" of other tables For example: i want col_1 to have the number of
> >items in some_other_table.dogs_owned<5, col_2 to have the number of
> >items in some_table_3.cats_owned<5.
> >
> >Is this possible?
> >
> >Thanks...
> >
> >Froek
> >
> >
>
Received on Thu Jul 27 2000 - 00:00:00 CEST

Original text of this message