[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Dynamic hint error
Thanks Peter, I've tried it, but still got this "ORA-00936: missing
expression" error.
it will work if I put hint this way
begin-select on-error=ERROR-DISPLAY
/*+ full(SFL)*/
SF.EXT_ORG_ID
SF.CONTRACT_NUM
....
It seems this dynamic hint can't be recognized.
Cheers
Eric
On 9/20/06, Peter Burton <Peter_Burton@hyperion.com> wrote:
>
> All,
>
> Try the following ...
>
> if ($bill = 'S' or $bill = 'A')
> let $hint = '/*+ full(SFL)*/) SF.EXT_ORG_ID'
> else
> let $hint = 'SF.EXT_ORG_ID'
> end-if
>
> begin-select on-error=ERROR-DISPLAY
> [$HINT] &SF.EXT_ORG_ID=Char
> SF.CONTRACT_NUM
> SF.EMPLID
> FROM PS_ITEM_SF SF, PS_ITEM_LINE_SF SFL
> WHERE SF.BUSINESS_UNIT = $business_unit
> AND SF.BUSINESS_UNIT = SFL.BUSINESS_UNIT
> AND SF.ITEM_NBR = SFL.ITEM_NBR
> AND SFL.BILLING_FLAG <> 'Y'
> end-select
>
> Peter
>
> -----Original Message-----
> From: sqr-users-bounces+peter_burton=hyperion.com@sqrug.org
> [mailto:sqr-users-bounces+peter_burton=hyperion.com@sqrug.org] On Behalf
> Of Ian Mills
> Sent: Wednesday, September 20, 2006 3:05 AM
> To: sqr-users@sqrug.org
> Subject: Re: [sqr-users] Dynamic hint error
>
> Eric,
>
> Maybe it is not possible to have Dynamic Hints.
>
> You could always put a begin-select within the IF statement. One that
> has the Hint included and the other with no hint.
>
> I cannot see why you would want to apply a hint on some circumstances
> and not on others as in your case, $bill has no impact on the query
> itself so why don't you always include a hint
>
> Regards,
> Ian
> ORIX Australia Corp Ltd
>
> >>> eric.s.huang@gmail.com 20/09/2006 4:56 pm >>>
> Thanks Ian, but if deleting &hint=char, it will bring another error
>
> "(SQR 3743) Dynamic columns must have a &pseudonym."
>
> Regards
>
> Eric
>
> On 9/20/06, Ian Mills <Ian.Mills@orix.com.au> wrote:
> >
> > Eric,
> >
> > Try deleting &hint=char
> > Having this makes SQR think it is refering to a column named "/*+
> > full(SFL)*/)"
> >
> > Regards,
> > Ian
> > ORIX Australia Corp Ltd
> >
> > >>> eric.s.huang@gmail.com 20/09/2006 4:19 pm >>>
> > Hi,
> >
> > I am trying to use a dynamic hint in my SQR like this:
> >
> > if ($bill = 'S' or $bill = 'A')
> > let $hint = ' /*+ full(SFL)*/)'
> > else
> > let $hint = ''
> > end-if
> >
> > begin-select on-error=ERROR-DISPLAY
> > [$hint] &hint=char
> > SF.EXT_ORG_ID
> > SF.CONTRACT_NUM
> > SF.EMPLID
> > FROM PS_ITEM_SF SF, PS_ITEM_LINE_SF SFL
> > WHERE SF.BUSINESS_UNIT = $business_unit
> > AND SF.BUSINESS_UNIT = SFL.BUSINESS_UNIT
> > AND SF.ITEM_NBR = SFL.ITEM_NBR
> > AND SFL.BILLING_FLAG <> 'Y'
> > end-select
> >
> >
> >
> > When I set "bill = S or A" and run this SQR, it comes out an error:
> > "DB-Error in C:\SQR\002.sqr at line 322: ORA-00936: missing
> expression"
> > otherwise, it runs successfully.
> >
> > Does anybody help me out of it? Thanks a lot.
> >
> >
> > Cheers
> >
> > Eric
> >
> > _______________________________________________
> > sqr-users mailing list
> > sqr-users@sqrug.org
> > http://www.sqrug.org/mailman/listinfo/sqr-users
> >
> >
> >
> > --
> >
> > This message from ORIX Australia might contain confidential and/or
> > privileged information. If you are not the intended recipient, any
> use,
> > disclosure or copying of this message (or of any attachments to it) is
> > not authorised.
> >
> > If you have received this message in error, please notify the sender
> > immediately and delete the message and any attachments from your
> > system. Please inform the sender if you do not wish to receive future
> > communications by email.
> >
> > ORIX handles personal information according to a Privacy Policy that
> is
> > consistent with the National Privacy Principles. Please let us know if
> > you would like a copy. It is also available at http://www.orix.com.au
> .
> >
> >
> >
> > _______________________________________________
> > sqr-users mailing list
> > sqr-users@sqrug.org
> > http://www.sqrug.org/mailman/listinfo/sqr-users
> >
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
>
>
>
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
>
> If you have received this e-mail in error, please delete it and notify the
> sender as soon as possible. The contents of this e-mail may be confidential
> and the unauthorized use, copying, or dissemination of it and any
> attachments to it, is prohibited. Internet communications are not secure and
> Hyperion does not, therefore, accept legal responsibility for the contents
> of this message nor for any damage caused by viruses. The views expressed
> here do not necessarily represent those of Hyperion. For more information
> about Hyperion, please visit our Web site at: www.hyperion.com
>
>
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users