Subject | Re: [IBO] Update SQL question |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-03-27T02:00:03Z |
Hi Alan,
case it was a SELECT statement where he used the same param twice
(thread: "TIBOQuery bug?"). Problem disappeared when he changed to two
params (which he fed the same value).
Helen then replied:
compare it to the _same_ column twice.
Greetings,
Paul Vinkenoog
> I have an update statement which is trying to do the followingA couple of hours ago someone reported a similar problem, only in his
>
> UPDATE TBLBSLIST SET
> BSREQIND = :BSREQIND, /*PK*/
> LINKTOPROJ = (SELECT LINKTOPROJ FROM TBLJOBSCHEDULE WHERE
> TBLJOBSCHEDULE.JOBIND=:LINKTOJOBSCHED),
> LINKTOWO = (SELECT LINKTOBSAWWO FROM TBLJOBSCHEDULE WHERE
> TBLJOBSCHEDULE.JOBIND=:LINKTOJOBSCHED),
> BSNO = :BSNO,
> LINKTOSLAB = :LINKTOSLAB,
> etc
>
> the result is that the first LINTOPROJ value is set correctly, but
> it apears as though the second use of the parameter :LINKTOJOBSCHED
> is NULL. Is this supposed to happen, i.e. a parameter is cleared to
> null after it's first use? Is this IBO or the engine?
case it was a SELECT statement where he used the same param twice
(thread: "TIBOQuery bug?"). Problem disappeared when he changed to two
params (which he fed the same value).
Helen then replied:
> Parameters and parameter values are not the same thing. A parameterCould it be you hit the same snag? Although you do use the param to
> is an object associated with a database column. The token
> ":paramname" is a reference to the parameter, not its value. You
> can apply the same VALUE to two different parameters, but you can't
> apply the same parameter to two different columns.
compare it to the _same_ column twice.
Greetings,
Paul Vinkenoog