Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Olap > Re: Syntax for ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 1172 of 1299
Post > Topic >>

Re: Syntax for simple (?) pivot with MODEL clause

by William Robertson <williamr2019@[EMAIL PROTECTED] > Aug 16, 2007 at 07:51 AM

On Aug 13, 10:22 pm, dba_...@[EMAIL PROTECTED]
 wrote:
> OK, I'm back.  No emergencies today.
>
> Our data changes on a daily, weekly and monthly basis.
> So, hardcoding values is not an option.
>
> CASE and DECODE would require hardcoding; that you
> know exactly what the values will be.  If new rows with
> new and different values were entered into the field,
> you would have to re hardcode the query.
>
> I had looked at PSOUG
actually.http://www.psoug.org/reference/model_clause.html
>
> Where at least some of the examples were the same as
from:http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/sqlmod...
>
> Both examples required hardcoding the value:
>
> RULES (sales['Bounce', 2005] = 100 + MAX(sales)['Bounce',
> year BETWEEN 1998 AND 2002])
>
> ie.  'BOUNCE', refers to product = 'BOUNCE'
>
> With 10G's new features, is it possible to do this kind of thing,
> dynamically getting a different number of columns back?
> In particular with the MODEL clause?
>
> Perhaps a new feature in Oracle 11?
>
> What is the secret please?

No, 11g's PIVOT clause still requires you to specify literal values to
define the columns. AFAIK there is no way for a static query to return
a varying number of columns. Possibly there is a way to do this by
unlea****ng the dark power of XQuery, but let's not go there.
 




 5 Posts in Topic:
Syntax for simple (?) pivot with MODEL clause
dba_222@[EMAIL PROTECTED]  2007-08-02 09:01:43 
Re: Syntax for simple (?) pivot with MODEL clause
DA Morgan <damorgan@[E  2007-08-02 11:21:46 
Re: Syntax for simple (?) pivot with MODEL clause
dba_222@[EMAIL PROTECTED]  2007-08-13 14:22:19 
Re: Syntax for simple (?) pivot with MODEL clause
DA Morgan <damorgan@[E  2007-08-14 08:19:24 
Re: Syntax for simple (?) pivot with MODEL clause
William Robertson <wil  2007-08-16 07:51:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 20:00:42 CDT 2008.