[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: FW: Odd error on Select statement
- Subject: Re: FW: Odd error on Select statement
- From: Manoj Gurjar <mgurjar@HOTMAIL.COM>
- Date: Tue, 6 Jun 2000 11:17:11 EDT
put sg. in front of all field selected in select list
>From: "Ackerson, Glenn" <Glenn.Ackerson@UNCO.EDU>
>Reply-To: sqr-users@list.iex.net
>To: SQR-USERS@list.iex.net
>Subject: FW: Odd error on Select statement
>Date: Mon, 5 Jun 2000 15:44:17 -0600
>
> > Hi all,
> > I'm having a very odd and frustrating problem with some very basic
>code
> > in an SQR I'm working with and hoped that someone might be able to shed
> > light on why this error condition is occurring. As with many SQR's I've
> > written before, I have some code that is imbedded within a Select
> > statement that is coming back with the error message "(SQR 4407)
> > Referenced variables not defined:", followed by the variables within the
> > table I'm attempting to process. The SQR interpreter is almost acting as
> > if the code is somehow corrupted, but I can't figure out why. Since the
> > code is short, I've included it below. What's odd is that I've used this
> > same convention in numerous other programs and even within this program
> > itself. If any of you can enlighten me as to the cause, I would be most
> > grateful. Thanks in advance! On a P.S. note, would you mind CC'ing any
> > response to my e-mail address directly? I get messages in Digest Mode,
>and
> > would love to go home having this figured out - it's got me tearing my
> > hair out (and I don't have much hair left to tear out!)
> >
> > Regards,
> > Glenn Ackerson
> > **************************************************
> > Glenn Ackerson
> > Information Technology Professional III
> > Internet Address: Glenn.Ackerson@Unco.edu
> > University of Northern Colorado
> > Information Technology
> > Carter Hall Greeley, CO 80639
> >
> > The Code follows:
> >
> > !***********************************************************************
> > !***********************************************************************
> > ! Procedure : Select-Sal-Grade-Row
> > ! Purpose : Perform a select to see if a row already exists with the
> > ! : grade code associated with the jobcode just processed.
> > !***********************************************************************
> > !***********************************************************************
> > begin-procedure Select-Sal-Grade-Row
> >
> > let $SQL-STATEMENT = 'SELECT PS_SAL_GRADE_TBL'
> >
> > begin-SELECT on-error=SQL-Error
> > SETID
> > SAL_ADMIN_PLAN
> > GRADE
> > EFFDT
> > EFF_STATUS
> > DESCR
> > DESCRSHORT
> > SALARY_MATRIX_CD
> > RATING_SCALE
> > CURRENCY_CD
> > MIN_RT_HOURLY
> > MID_RT_HOURLY
> > MAX_RT_HOURLY
> > MIN_RT_MONTHLY
> > MID_RT_MONTHLY
> > MAX_RT_MONTHLY
> > MIN_RT_ANNUAL
> > MID_RT_ANNUAL
> > MAX_RT_ANNUAL
> > STEP_INCREM_TYPE
> > STEP_INCREM_ACCUM
> >
> > let $Sal-Grade-Found = 'Y'
> > display ' '
> > display 'Minimum Monthly Salary from file: ' noline
> > display #Min-Monthly-Sal
> > if #Min-Monthly-Sal <> &SG.MIN_RT_MONTHLY
> > display 'Monthly Salary in Input file different than table value...'
> > display 'Minimum Monthly Salary in Sal-Grade-Table: ' noline
> > display &SG.MIN_RT_MONTHLY
> > end-if
> >
> > FROM PS_SAL_GRADE_TBL SG
> > WHERE SG.GRADE = $NewGrade
> > AND SG.EFFDT =
> > (SELECT MAX(EFFDT)
> > FROM PS_SAL_GRADE_TBL
> > WHERE GRADE = $NewGrade)
> > end-SELECT
> > end-procedure
> >
> >
> > And the error message:
> >
> > (SQR 4407) Referenced variables not defined:
> >
> > &sg.min_rt_monthly
> > &sg.min_rt_monthly
> >
> > Errors were found in the program file.
> >
> > SQR: Program Aborting.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com