Re: Split Query
Date: Tue, 08 Jul 2008 23:08:11 +0200
Message-ID: <bkl7745u619a1ftbsnudmpimqrni37f7bg@4ax.com>
On Tue, 8 Jul 2008 08:59:39 -0700 (PDT), Mtek <mtek_at_mtekusa.com>
wrote:
>
>Hi,
>
>My requirements have been changed. I want to know if a query can be
>created that does the following, or am I stuck creating a function in
>PL/SQL.
>
>A string will be available in this format: A:3,B:2,C:5
>
>Basically, I need to query using the left side of the colon as a
>value, returning the number of records on the right side.
>
>So, in the example above I would get the records matching A, returning
>3 of them. Then get records matching B, returning 2 of them.........
>
>I was trying to see if any analytical function is available to do this
>nasty thing.......
>
>Thank you,
>
>John
The basic guideline in relational databases is that it is always more
easy to concatenate as opposed to 'parse'.
You have a repeating group with 2 attributes per group. There is a
'table' hiding in your group.
Oracle supports nested tables.
The 'design' needs to be designed urgently.
Otherwise Garbage In is Garbage Out.
-- Sybrand Bakker Senior Oracle DBAReceived on Tue Jul 08 2008 - 16:08:11 CDT