Re: how to pull just a single member from v$logfile

From: godba blore <racoradba_at_gmail.com>
Date: Fri, 21 Nov 2008 16:18:43 -0500
Message-ID: <eae33bca0811211318y75ab08f8nadbb7ccc58c8ebaa@mail.gmail.com>


Thank you very much Jared that works like a charm.

Sam

On Fri, Nov 21, 2008 at 3:30 PM, Jared Still <jkstill_at_gmail.com> wrote:

> On Fri, Nov 21, 2008 at 10:57 AM, godba blore <racoradba_at_gmail.com> wrote:
>
>> Hi group,
>>
>> Need help in writing a query.
>> I have 6 groups in a database and in each of these groups I have 2
>> members.
>> I need to write a query where in it pulls only one member from each of the
>> group
>>
>> select a.group#,a.thread#,b.member from v$log a,v$logfile b where
>> a.group#=b.group#;
>> GROUP# THREAD# MEMBER
>> ---------- ---------- --------------------
>> 1 1 /dev/rorarptlv00801
>> 1 1 /dev/rorarptlv00901
>> 2 1 /dev/rorarptlv00802
>> 2 1 /dev/rorarptlv00902
>> 3 1 /dev/rorarptlv00803
>> ...I know this is a wrong place to ask, but I think my dba community can
>> help me out here.
>>
>>
> No, this is the right place.
>
> There's more than one way to do this, but this works, as long as you don't
> care which
> member of each group is shown in the results.
>
> select a.group#,a.thread#,min(b.member) member
> from v$log a,v$logfile b
> where a.group#=b.group#
> group by a.group#, a.thread#
>
>
> Jared Still
> Certifiable Oracle DBA and Part Time Perl Evangelist
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Nov 21 2008 - 15:18:43 CST

Original text of this message