Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 15th, 2006, 06:52 PM
Registered User
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Comparing Nested Collections

--I have the following:

CREATE TYPE nj_analyst.contacts_in_month_rec IS OBJECT
  (idn_participants NUMBER
  ,dte_entered DATE);

CREATE OR REPLACE TYPE nj_analyst.contacts_in_month_tab IS VARRAY(31) OF nj_analyst.contacts_in_month_rec;

--and I have a table children with these collections:
,contacts_this_month nj_analyst.contacts_in_month_tab
,contacts_last_month nj_analyst.contacts_in_month_tab

--which have been populated by
                    (SELECT CAST(MULTISET(
                        SELECT MAX(idn_participants) KEEP (DENSE_RANK LAST ORDER BY dte_endered, idn_participants)
                              ,MAX(TRUNC(dte_held)) KEEP (DENSE_RANK LAST ORDER BY dte_endered, idn_participants)
                        FROM nj_data.all_contact_info a
                        WHERE a.case_number = x.case_num
                        AND a.smem_member = x.member_num)
                        AS contacts_in_month_tab)
                      FROM DUAL

How would I compare the two collections to see if any of the dates entered (dte_entered)are in both contacts_THIS_month and contacts_LAST_month.

any help is appreciated

Scott Kirner

Similar Threads
Thread Thread Starter Forum Replies Last Post
collections help bennyt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 July 26th, 2008 01:30 AM
Collections in C#? shenku C# 1 August 17th, 2005 06:16 AM
Collections question GregV VB.NET 2002/2003 Basics 0 August 6th, 2003 12:24 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.