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

Re: References to Column Variables in functions/expressions?



I've had problems with this.  The situation in which one procedure uses, in
a Where clause, an &variable from another procedure gave inconsistent
results and could cause the SQR to crash when it was run on the server.  It
was never repeatable on a workstation.  But it was a batched SQR that ran
overnight through PeopleSoft and when it crashed none of the following SQRs
would execute.  This was SQR 4 and SQL Server.

Bruce

> -----Original Message-----
> Date:    Fri, 17 Nov 2000 15:57:59 -0800
> From:    David Donnelly <Dave@ISISBIO.COM>
> Subject: Re: References to Column Variables in functions/expressions?
>
> This is an interesting question, David.  I've never had any
> problem with referencing column variables.
>
> I think the caution comes from the possibility that the column
> variable might not have a value assigned to it, either because
> the select has never been executed or it returned no rows.  What
> would happen if the query returned a row on the first execution,
> but no rows on the second?
>
> I am fairly sure I have done this somewhere in my SQR systems,
> and have never had it cause an error that I know of (and we're
> talking about Oracle, with SQR v3 and v4).  But it's probably
> best to refer to these only when they're logically "in scope".
>
> Dave
>
>
>
> At 05:24 PM 11/17/2000 -0600, you wrote:
> >(I am using SQR 4 with PeopleSoft talking to Oracle 7... but my questions
> >is pretty DB/OS independent...)
> >
> >Back when I trained in SQR (over 18 months ago), I remember being taught
> >that column variables (&variables) should not be used in certain
> circumstances.
> >
> >One of these was to NOT use &column variables in logical expressions or
> >functions.  The results were "not guaranteed" (as I remember our
> instructor
> >describing it).
> >