Re: Dynamically creating a query - using lexical parameters

From: RichardGrant <RichardGrant_at_Capgemini.co.uk>
Date: Wed, 31 Mar 1999 08:41:56 +0100
Message-ID: <3701D1C3.3F70_at_Capgemini.co.uk>


sivakumar_t_at_my-dejanews.com wrote:
>
> Hi,
>
> I dynamically created a query using lexical parameters
>
> SELECT
> &type1,
> &type2
> FROM &fromclause
> WHERE &whereclause
> GROUP BY &groupby
>
> I have substituted values for these lexical references thru formula columns
> and the query now looks like
>
> SELECT
> t1.type1,
> t2.type2,
> t2.value
> FROM tab1 t1,tab2 t2
> WHERE tab1.type1 = tab2.type2
> GROUP BY t2.type1,t2.type1,t2.value
>
> However the problem is, When i run the report this query is not getting
> executed.Instead the relevant fields in the layout are having the text values.
>
> For example,the groupby field in the layout has the value
> t2.typ1,t2.type2,t2.value.
>
> (1) What should i do to run this report ? (2) I am dynamically changing the
> query and the groupby clauses.But my datamodel is going to be fixed.How
> Oracle Reports take care of this ??
>
> Regards
> Siva
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

You must use an alias for each column so that the layout has something permanent to fix to

Ie

Select
&column1 as Col1
&column2 as Col2

etc etc

Hope this answers your query Received on Wed Mar 31 1999 - 09:41:56 CEST

Original text of this message