[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Substring within where clause



No, its not a general rule. In peoplesoft most often
you find effdt in where clause is not selected in the
select statement.

I think using column variable i.e., & in the where
clause is not a good practice.

Any comments..


--- Sam Spritzer <SSpritzer@GW.CTG.COM> wrote:
> Ok...so what do I win? <g>  Actually, the general
> rule of the thumb is if you need a column in the
> WHERE clause, it has to be part of the select
> statement.
> Sam
>
> "In the beginning, there was something...which
> exploded yet, they find nothing."
>
> Sam Spritzer
> sam.spritzer@ctg.com
> www.ctg.com
>
> >>> smoore@NWTC.TEC.WI.US 08/23 12:17 PM >>>
> Sam, you rock!  That's what my problem was.  I
> forgot to include &DESCR in
> the select (before the FROM clause).
> Thanks so much to all of you for your responses.
>
>
>
>
>                     Sam Spritzer
>                     <SSpritzer@GW.       To:
> SQR-USERS@list.iex.net
>                     CTG.COM>             cc:
>                     Sent by:             Subject:
>  Re: Substring within where clause
>                     "Discussion of
>                     SQR,
>                     Brio
>                     Technology's
>                     database
>                     reporting
>                     language"
>                     <SQR-USERS@lis
>                     t.iex.net>
>
>
>                     08/23/01 10:48
>                     AM
>                     Please respond
>                     to sqr-users
>
>
>
>
>
>
> You need to include DESCR in your select statement.
> Sam
>
> >>> smoore@NWTC.TEC.WI.US 08/23 11:06 AM >>>
> I need to select a field from a table based on a
> substring of a field
> within that table.  I tried the following (and other
> variations), and
> received select errors:
> ---------------------------------------
>  begin-select
> A.ACAD_STATS_PERIOD
> FROM PS_STAT_PERIOD_TBL A
>
> WHERE substr(&A.DESCR,1,15) = $H_Academic_Term
>
> end-select
> ----------------------------------------
> (I also tried it without the & before A.DESCR and
> got errors...)
> Is it even possible to use substring within the
> where clause?  Any
> suggestions would be greatly appreciated!


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/