A possibility, Put the table alias on all the lookups. (Use the correct ones or course)
Albert > WHERE T1.Quote# = ‘123456’ AND T1.Window = 1 AND T2.CostType = ‘A' AND > T2.SnapShotID = 9 AND T1.MasterPart# = T2.MasterPart#') > On Jun 28, 2017, at 10:58 AM, Stuart Hellman <[email protected]> wrote: > > Buddy, > > It would look something like this: > > WHERE Quote# = ‘123456’ AND Window = 1 AND CostType = ‘A' AND T2.SnapShotID > = 9 AND T1.MasterPart# = T2.MasterPart#') > > The WHERE clause should be good. As stated before, the DECLARE, and OPEN > return a 0 (zero). The FETCH doesn’t want to cooperate. > > I appreciate the input. > > Stu > > > From: [email protected] [mailto:[email protected]] On Behalf Of > Buddy Walker > Sent: Wednesday, June 28, 2017 10:20 AM > To: [email protected] > Subject: RE: [RBASE-L] - Peculiar Cursor Behavior > > Stu > Would it be possible to show us final vWhere variable with the actual > values. > > Buddy > > <> > From: [email protected] <mailto:[email protected]> > [mailto:[email protected] <mailto:[email protected]>] On Behalf > Of Stuart Hellman > Sent: Tuesday, June 27, 2017 1:11 PM > To: [email protected] <mailto:[email protected]> > Subject: RE: [RBASE-L] - Peculiar Cursor Behavior > > There are different sets of tables used for different processes, so that is > why the WHERE clause is a variable > > SET VAR vTable = 'QuoteDetail' > SET VAR vWhere = ('WHERE Quote# = .vQuote# AND Window = .vWindow ') > SET VAR vWhere = (.vWhere & 'AND CostType = .vPrimAlt') > > SET VAR vWhere = + > (.vWhere & 'AND T2.SnapShotID = .vSnapShotID AND T1.MasterPart# = > T2.MasterPart#') > > BROWSE T1.MasterPart#, length, ummult FROM &vTable T1, snappartmast T2 &vWhere > > DECLARE QteDetail CURSOR + > FOR SELECT T1.MasterPart#, T1.Length, T2.UMMult + > FROM &vTable T1, SnapPartMast T2 &vWhere > > OPEN QteDetail > > FETCH QteDetail + ßHere is where the 406 error code is returned in > my error variable > INTO vQPart# vInd, vLength vInd, vUMMult vInd > IF SQLCODE = 100 THEN > GOTO EndLoop > ENDIF > > > > From: [email protected] <mailto:[email protected]> > [mailto:[email protected] <mailto:[email protected]>] On Behalf > Of Buddy Walker > Sent: Tuesday, June 27, 2017 9:28 AM > To: [email protected] <mailto:[email protected]> > Subject: RE: [RBASE-L] - Peculiar Cursor Behavior > > Stuart > Is it possible for you to show the complete browse and declare statements. > > Buddy > > From: [email protected] <mailto:[email protected]> > [mailto:[email protected] <mailto:[email protected]>] On Behalf > Of Stuart Hellman > Sent: Tuesday, June 27, 2017 8:51 AM > To: [email protected] <mailto:[email protected]> > Subject: [RBASE-L] - Peculiar Cursor Behavior > > Need some expert advice on a cursor problem I’m having. > > The situation is a large form in which is using about 10, one at a time. > Nothing “exotic” is going on with the cursor in question. All of them work > except one. Data is being retrieved from 2 tables. The cursor is dropped, > declared, opened and then the data is to be fetched. This is the point where > things go south. > > The SQLCode being returned is ‘100’ and the Error Variable value returned is > ‘406’, which means End-Of-Data. In trying to determine the cause, a BROWSE > was placed before the FETCH having converted the DECLARE statement. The three > rows expected are displayed. Put a SELECT after, again converting the DECLARE > statement plus adding a LIMIT = 1 clause. No problems. > > Two very simple questions here: > 1: Why is R:Base returning the End-Of-Data condition when the SELECT clause > is correct? > 2: What needs to be done to fix the situation? > > Thank you in advance for your help. > > > Stu Hellman > > > <image001.jpg> <http://www.qmiusa.com/> > Stuart Hellman > Software Designer > Email: > [email protected] <mailto:[email protected]> > Toll Free: > 800-446-2500 > International: > 01 630-529-7111 > Extension: > 1029 > www.qmiusa.com <http://www.qmiusa.com/> > > > . > This email may contain material that is confidential, privileged and/or > attorney work product for the sole use of the intended recipient. Any review, > reliance or distribution by others or forwarding without express permission > is strictly prohibited. If you are not the intended recipient, please contact > the sender and delete all copies > -- > You received this message because you are subscribed to the Google Groups > "RBASE-L" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > -- > You received this message because you are subscribed to the Google Groups > "RBASE-L" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > -- > You received this message because you are subscribed to the Google Groups > "RBASE-L" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > -- > You received this message because you are subscribed to the Google Groups > "RBASE-L" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > -- > You received this message because you are subscribed to the Google Groups > "RBASE-L" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

