Return-Path: <ml-errors@fatcity.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h7SCfOx22091
 for <oracle-l@orafaq.net>; Thu, 28 Aug 2003 07:41:24 -0500
X-ClientAddr: 66.27.56.210
Received: from ns3.fatcity.com (rrcs-west-66-27-56-210.biz.rr.com [66.27.56.210])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h7SCfN322086
 for <oracle-l@orafaq.net>; Thu, 28 Aug 2003 07:41:23 -0500
Received: from ns3.fatcity.com (localhost.localdomain [127.0.0.1])
 by ns3.fatcity.com (8.12.5/8.12.5) with ESMTP id h7SAA1Ml029940
 for <oracle-l@orafaq.net>; Thu, 28 Aug 2003 03:10:59 -0700
Received: (from root@localhost)
 by ns3.fatcity.com (8.12.5/8.12.5/Submit) id h7SA0NQE028255
 for oracle-l@orafaq.net; Thu, 28 Aug 2003 03:00:23 -0700
Received: by fatcity.com (05-Jun-2003/v1.0g-b73/bab) via fatcity.com id 005CDACE; Thu, 28 Aug 2003 02:59:30 -0800
Message-ID: <F001.005CDACE.20030828025930@fatcity.com>
Date: Thu, 28 Aug 2003 02:59:30 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Naveen Nahata" <naveen_nahata@mindtree.com>
Sender: ml-errors@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Naveen Nahata" <naveen_nahata@mindtree.com>
Subject: RE: SQL HELP.....
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 73; ListGuru (c) 1996-2003 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: multipart/alternative;	boundary="----_=_NextPart_001_01C36D4A.29F12734"
------_=_NextPart_001_01C36D4A.29F12734
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

"Open the cartons and see!" ;-)
=20
By the way can you reframe your question? Do you mean that you table =
stores
data as follows:
=20
item carton_no qty weight
---- --------- --- ------
A    1         4   10
A    2         4   10
B    1         5   12
B    3         5   12
C    1         3   5
=20
and so on?
=20
Regards
Naveen

-----Original Message-----
Sent: Thursday, August 28, 2003 3:45 PM
To: Multiple recipients of list ORACLE-L



I have a table with the following columns:

- item

- carton_number    --->(min)

- carton_number    --->(max)

- qty    --->(sum)

- weight  --->(sum)

=20

Item A has qty of 4515 and present in cartons 1 to 1129

Item B has qty of 7255 and present in cartons 1 to 1129

Item C has qty of 400 and present in cartons 1 to 600 (???)

=20

I want to find which cartons from 1 to 600 does not contain Item C.

=20

Can you give me a sql/plsql script to do this.=20

=20

Thanks a lot,

=20

Yoyong Cabansay

Email: lbcabansay@timex.com



DISCLAIMER:
This message (including attachment if any) is confidential and may be =
privileged. Before opening attachments please check them for viruses and =
defects. MindTree Consulting Private Limited (MindTree) will not be =
responsible for any viruses or defects or any forwarded attachments =
emanating either from within MindTree or outside. If you have received =
this message by mistake please notify the sender by return  e-mail and =
delete this message from your system. Any unauthorized use or =
dissemination of this message in whole or in part is strictly =
prohibited.  Please note that e-mails are susceptible to change and =
MindTree shall not be liable for any improper, untimely or incomplete =
transmission.

------_=_NextPart_001_01C36D4A.29F12734
Content-Type: text/html;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle18
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-footer-margin:.5in;}
div.Section1
	{page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>"Open the cartons and see!" ;-)</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>By the way can you reframe your question? Do you mean that you =
table=20
stores data as follows:</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>item carton_no qty weight</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>---- --------- --- ------</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>A&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;=20
4&nbsp;&nbsp;&nbsp;10</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>A&nbsp;&nbsp;&nbsp; =
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
4&nbsp;&nbsp; 10</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>B&nbsp;&nbsp;&nbsp; =
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
5&nbsp;&nbsp; 12</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>B&nbsp;&nbsp;&nbsp; =
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
5&nbsp;&nbsp; 12</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>C&nbsp;&nbsp;&nbsp; =
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
3&nbsp;&nbsp;&nbsp;5</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>and so on?</FONT></SPAN></DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D848083809-28082003><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>Regards<BR>Naveen</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Cabansay, Yoyong=20
  [mailto:lbcabansay@timex.com]<BR><B>Sent:</B> Thursday, August 28, =
2003 3:45=20
  PM<BR><B>To:</B> Multiple recipients of list =
ORACLE-L<BR><B>Subject:</B> SQL=20
  HELP.....<BR><BR></FONT></DIV>
  <DIV class=3DSection1>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have a table with the =
following=20
  columns:<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">-=20
item<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">- carton_number=20
  &nbsp;&nbsp;&nbsp;-</SPAN></FONT><FONT face=3DWingdings size=3D2><SPAN =

  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Wingdings">=E0</SPAN></FONT><FONT=20
  face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">(min)<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">- carton_number=20
  &nbsp;&nbsp;&nbsp;-</SPAN></FONT><FONT face=3DWingdings size=3D2><SPAN =

  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Wingdings">=E0</SPAN></FONT><FONT=20
  face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">(max)<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">- qty&nbsp;=20
  &nbsp;&nbsp;-</SPAN></FONT><FONT face=3DWingdings size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Wingdings">=E0</SPAN></FONT><FONT=20
  face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">(sum)<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">- weight&nbsp;=20
  -</SPAN></FONT><FONT face=3DWingdings size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Wingdings">=E0</SPAN></FONT><FONT=20
  face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">(sum)<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Item A has qty of 4515 =
and present=20
  in cartons 1 to 1129<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Item B has qty of 7255 =
and present=20
  in cartons 1 to 1129<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Item C has qty of 400 =
and present=20
  in cartons 1 to 600 (???)<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I want to find which =
cartons from=20
  1 to 600 does not contain Item C.<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Can you give me a =
sql/plsql script=20
  to do this. <o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks a=20
  lot,<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Yoyong=20
  Cabansay<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Email:=20
  =
lbcabansay@timex.com<o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE><p></=
p><p>DISCLAIMER:<br>This message (including attachment if any) is =
confidential and may be privileged. Before opening attachments please =
check them for viruses and defects. MindTree Consulting Private Limited =
(MindTree) will not be responsible for any viruses or defects or any =
forwarded attachments emanating either from within MindTree or outside. =
If you have received this message by mistake please notify the sender by =
return  e-mail and delete this message from your system. Any =
unauthorized use or dissemination of this message in whole or in part is =
strictly prohibited.  Please note that e-mails are susceptible to change =
and MindTree shall not be liable for any improper, untimely or =
incomplete transmission.</BODY></HTML>

------_=_NextPart_001_01C36D4A.29F12734--
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Naveen Nahata
  INET: naveen_nahata@mindtree.com

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).

