Return-Path: <root@fatcity.cts.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id gABCYMG31133
 for <oracle-l@orafaq.net>; Mon, 11 Nov 2002 06:34:22 -0600
X-ClientAddr: 209.68.248.164
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id gABCYMX31128
 for <oracle-l@orafaq.net>; Mon, 11 Nov 2002 06:34:22 -0600
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id CAA21979;
 Mon, 11 Nov 2002 02:14:55 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 004FFEC8; Mon, 11 Nov 2002 02:03:39 -0800
Message-ID: <F001.004FFEC8.20021111020339@fatcity.com>
Date: Mon, 11 Nov 2002 02:03:39 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: Nirmal Kumar  Muthu Kumaran <NIRMALK@qtel.com.qa>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: Nirmal Kumar  Muthu Kumaran <NIRMALK@qtel.com.qa>
Subject: RE: ORACLE QUERY
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: multipart/alternative;	boundary="----_=_NextPart_001_01C28969.1AD9ADC0"
------_=_NextPart_001_01C28969.1AD9ADC0
Content-Type: text/plain

select record_identifier from records where rownum<(
select 40-count(*) from
(select 1 from customer_view
union all
select 2 from unit_view)
); 
 
Just a thought, HTH.
 
Nirmal.

-----Original Message-----
Sent: Monday, November 11, 2002 11:13 AM
To: Multiple recipients of list ORACLE-L


Hi All, 

I want to know about one query. 


I have two views and I want to get the sum of count of two view ex 
I have a query like 


select record_identifier from records where rownum<(40-(select count(*) from
customer_view+select count(*) from 
unit_view)); 


But this is not working in oracle. 


Is there any other way to do this without writing a function 
-- 
Best Regards 
- Savita 
---------------------------------------------------- 
Hewlett Packard (India) 
+91 80 2051288 (Phone) 
847 1288 (HP Telnet) 
---------------------------------------------------- 
  


------_=_NextPart_001_01C28969.1AD9ADC0
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">


<META content="MSHTML 5.00.3315.2870" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><B><FONT color=#ff6666>select 
record_identifier from records where rownum&lt;(</FONT></B></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=118534309-11112002><STRONG>select 40-count(*) 
from</STRONG></SPAN></FONT></DIV>
<DIV><FONT color=#0000ff><FONT size=2><FONT face=Arial><B><SPAN 
class=118534309-11112002>(</SPAN>select&nbsp;<SPAN 
class=118534309-11112002>1</SPAN> from 
customer_view</B></FONT></FONT></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=118534309-11112002><STRONG>union all</STRONG></SPAN></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff><B>select&nbsp;<SPAN 
class=118534309-11112002>2</SPAN> from</B> <B><FONT color=#ff6666><FONT 
color=#0000ff>unit_view<SPAN 
class=118534309-11112002>)</SPAN></FONT></FONT></B></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff><B><FONT 
color=#ff6666><FONT color=#0000ff><SPAN 
class=118534309-11112002></SPAN></FONT>);</FONT></B> </FONT></FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#ff6666 face=Arial size=2><SPAN 
class=118534309-11112002><STRONG>Just a thought, 
HTH.</STRONG></SPAN></FONT></DIV>
<DIV><FONT color=#ff6666 face=Arial size=2><SPAN 
class=118534309-11112002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#ff6666 face=Arial size=2><SPAN 
class=118534309-11112002><STRONG>Nirmal.</STRONG></SPAN></FONT></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Savita 
  [mailto:savita@india.hp.com]<BR><B>Sent:</B> Monday, November 11, 2002 11:13 
  AM<BR><B>To:</B> Multiple recipients of list ORACLE-L<BR><B>Subject:</B> 
  ORACLE QUERY<BR><BR></DIV></FONT>Hi All, 
  <P>I want to know about one query. 
  <P>I have two views and I want to get the sum of count of two view ex <BR>I 
  have a query like 
  <P><B><FONT color=#ff6666>select record_identifier from records where 
  rownum&lt;(40-(select count(*) from customer_view+select count(*) 
  from</FONT></B> <BR><B><FONT color=#ff6666>unit_view));</FONT></B> 
  <P>But this is not working in oracle. 
  <P>Is there any other way to do this without writing a function <BR>-- 
  <BR>Best Regards <BR>- Savita 
  <BR>---------------------------------------------------- <BR>Hewlett Packard 
  (India) <BR>+91 80 2051288 (Phone) <BR>847 1288 (HP Telnet) 
  <BR>---------------------------------------------------- <BR>&nbsp; 
</P></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C28969.1AD9ADC0--
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Nirmal Kumar  Muthu Kumaran
  INET: NIRMALK@qtel.com.qa

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

