[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Dynamic sql field problem on UNIX server
- Subject: RE: [sqr-users] Dynamic sql field problem on UNIX server
- From: "Bambach, Tom" <TBambach@genchemcorp.com>
- Date: Wed, 13 Nov 2002 07:40:02 -0500
- List-id: This list is for discussion about the SQR database reporting language from Brio Software. <sqr-users.sqrug.org>
Prasanna,
Thanks, but my problem is not an "order by" substitution - I have done that
many times with no problem...
This program is substituting for a field name in the select list and works
fine on the client but bombs on the (UNIX) server; I also have other
programs
that substitute for a field name that work on both the client and UNIX
server,
so I don't understand why this program is having a problem.
Tom
> -----Original Message-----
> From: Prasanna Menta [SMTP:pmenta@umuc.edu]
> Sent: Tuesday, November 12, 2002 2:21 PM
> To: sqr-users@sqrug.org
> Subject: Re: [sqr-users] Dynamic sql field problem on UNIX server
>
> Hello,
> See if the following sample code:
> input $Order_By 'Enter Y - Empl Name Order, N - Employer,Empl Name
> Order '
> Evaluate $Order_by
> when= 'Y'
> let $Order_by ='order by c.name'
> break
> when='N'
> let $Order_By = 'order by d.address1,c.name'
> break
> End-evaluate
>
> Select section will be as follows:
> where a.class_nbr = #ClassNbr
> AND b.item_amt >0
> [$order_by]
>
> Hope this helps
> Prasanna
>
> "Bambach, Tom" wrote:
> >
> > I am running SQR v4.3.4 for PeopleSoft v7.0 (ORACLE) and v7.5 (ORACLE
> and
> > MS)...
> >
> > When my code looks like below, it works fine in all
> > environments:
> >
> > begin-select
> >
> > X.BUSINESS_UNIT &Xbusiness_unit
> > X.VOUCHER_ID &Xvoucher_id
> > X.DUE_DT &Xdue_dt=date
> > X.SCHEDULED_PAY_DT &Xscheduled_pay_dt=date
> > X.REMIT_VENDOR &Xremit_vendor
> > V.INVOICE_ID &Vinvoice_id
> > V.INVOICE_DT &Vinvoice_dt=date
> > V1.WTHD_SW &V1wthd_sw
> >
> > let $Xbusiness_unit = &Xbusiness_unit
> > let $Xvoucher_id = &Xvoucher_id
> > let $Xdue_dt = &Xdue_dt
> > let $Xscheduled_pay_dt = &Xscheduled_pay_dt
> > let $Xremit_vendor = &Xremit_vendor
> > let $Vinvoice_id = &Vinvoice_id
> > let $Vinvoice_dt = &Vinvoice_dt
> > let $V1wthd_sw = &V1wthd_sw
> >
> > let #upd_ctr = #upd_ctr + 1
> > if $V1wthd_sw = 'Y'
> > let #upd_ctr_wthd = #upd_ctr_wthd + 1
> > end-if
> > if $run_mode = 'U'
> > if $V1wthd_sw = 'Y'
> > do update-tables-wthd
> > else
> > do update-tables
> > end-if
> > end-if
> >
> > do write-file
> >
> > FROM PS_PYMNT_VCHR_XREF X, PS_VOUCHER V, PS_VENDOR V1
> > WHERE X.BUSINESS_UNIT NOT IN ('GNTCC','GNTCU')
> > AND X.PYMNT_SELCT_STATUS IN ('D','N','R')
> > AND X.PYMNT_MESSAGE NOT LIKE 'GCC%'
> > AND X.BUSINESS_UNIT=V.BUSINESS_UNIT
> > AND X.VOUCHER_ID=V.VOUCHER_ID
> > AND V.INVOICE_DT<$pet_dt_plus1
> > AND V.OPRID='INTRFC'
> > AND X.REMIT_SETID=V1.SETID
> > AND X.REMIT_VENDOR=V1.VENDOR_ID
> >
> > end-select
> >
> > ===========================================================
> >
> > But if I use dynamic field definition
> >
> > if $db_name <> 'EPPROD'
> > !all databases except EPPROD are v7.5
> > let $wthdx = 'V1.WTHD_SW '
> > else
> > !EPPROD is v7.0
> > let $wthdx = 'V1.M1099_SW '
> > end-if
> >
> > then use it in the above select
> > [$wthdx] &V1wthd_sw=char
> >
> > instead of
> > V1.WTHD_SW &V1wthd_sw
> >
> > When I run on the Server (UNIX), I get the following
> > error message:
> >
> > prcs_sqr[271]: 19632 Memory fault(coredump)
> > prcs_sqr: ------------------- Error -------------------
> > prcs_sqr: Command failure
> > prcs_sqr: SQR Command Terminated abnormally
> > prcs_sqr: Return code : 139
> > prcs_sqr: ------------------- Error -------------------
> >
> > However, if I run on the client with the [$wthdx]... code
> > (either from a PeopleSoft panel or directly on the desktop),
> > it works fine...
> >
> > What's going on?
> >
> > Thanks.
> >
> > Tom Bambach
> >
> > _______________________________________________
> > 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