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

Re: Optional fields from a runctl panel



Bryan,

This can be done very easilt using dynamic SQL.  There are plenty of
good examples in this User Group's Archive, but here's a simplistic
example.  Let's assume that one of the optional fields is a From Date
value.  After you've retrieved (and optionally formatted) the field
from the run control record, try something like the following:

If $FromDate <> ''
   Let $WhereDate = ' And A.EFFDT >= ''' || $FromDate || ''''
End-If
. . .
Begin-Select
A.COLUMN1
A.COLUMN2
A.COLUMN3
>From PS_TABLE A
Where A.Key1 = $KeyValue1
[$WhereDate]
End-Select
. . .


I know this is a crude example, but hopefully it will illustrate the
technique well enough.

Good Luck,
Ed

>From: Bryan Richey <b_richey@YAHOO.COM>
>Reply-To: SQR-USERS@list.iex.net
>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>Subject: Optional fields from a runctl panel
>Date: Mon, 12 Apr 1999 15:09:04 -0700
>
>To whom may know the answer,
>
>I am writing an SQR that will be kicked off by a runctl panel in
>PeopleSoft.  There will be one of three possible reports that will
run
>depending on certain fields.  Is there a way that I can code my where
>clause to either equal nulls for a field that is optionally populated
>in the runctl panel?
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com



_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com