Select not working

sonal_m

Active Member
I am writing below piece of code in NER. The values are passing correctly to NER but the select is not working:

0007 F03B14.Select
BF mnPaymentID = TK Payment ID (Internal)
BF mnOriginalBatchNumber = TK Batch Number
0008 F03B14.Fetch Next
VA evt_WSC_mnLineIdentifier_RC5 <- TK File Line Identifier 5.0
VA evt_WSC_jdGLDate_DGJ <- TK Date - For G/L (and Voucher) - Julian
VA evt_WSC_mnCentury_CTRY <- TK Century
VA evt_WSC_mnFiscalYear_FY <- TK Fiscal Year
VA evt_WSC_mnMonth_PN <- TK Period Number - General Ledger
VA evt_WSC_jdVoidDateForGL_VDGJ <- TK Void Date - For G/L - Julian
0009 //
0010 While SV File_IO_Status is equal to CO SUCCESS
0012 //
0013 If VA evt_WSC_jdGLDate_DGJ is greater than VA evt_WSC_jdVoidDateForGL_VDGJ
0014 VA evt_WSC_mnVoidLineId_RC5 = [VA evt_WSC_mnLineIdentifier_RC5]+[BF mnCountOfRecords]
0015 F03B14.Update
BF mnPaymentID = TK Payment ID (Internal)
VA evt_WSC_mnVoidLineId_RC5 = TK File Line Identifier 5.0
VA evt_WSC_jdGLDate_DGJ -> TK Date - For G/L (and Voucher) - Julian
VA evt_WSC_mnCentury_CTRY -> TK Century
VA evt_WSC_mnFiscalYear_FY -> TK Fiscal Year
VA evt_WSC_mnMonth_PN -> TK Period Number - General Ledger
0016 End If
0017 F03B14.Fetch Next
VA evt_WSC_mnLineIdentifier_RC5 <- TK File Line Identifier 5.0
VA evt_WSC_jdGLDate_DGJ <- TK Date - For G/L (and Voucher) - Julian
VA evt_WSC_mnCentury_CTRY <- TK Century
VA evt_WSC_mnFiscalYear_FY <- TK Fiscal Year
VA evt_WSC_mnMonth_PN <- TK Period Number - General Ledger
VA evt_WSC_jdVoidDateForGL_VDGJ <- TK Void Date - For G/L - Julian
0018 End While
 
Surprisingly..I deleted statement, rewrote it and it worked!!

Please ignore this.
 
Have you tried copying and pasting those values into UTB, see what it gives you?

Plus are your indexes the same on the Select and FN?
 
What John says.

Plus:
- What does "not working" mean? You need to be more specific;
- Did you check the jdedebug log for the actual select statement and such?
 
[ QUOTE ]
- Did you check the jdedebug log for the actual select statement and such?

[/ QUOTE ]

Actually, skip UTB. When ever a DB I/O operation is not doing what you expect, grabbing the actual SQL statement out of the debug log and analyzing/running in your favorite ad-hoc SQL query tool/client (SQL Server management studio if you are on MS SQL Server) should be your next step. In fact, a lot of times when things ARE working as expected I still review the generated SQL statement for complex SQL statements to make sure it is doing what I intended.

Having said that, in this particular case, its possible you may need to look into using table handles - one for the loop and one for the update.
 
Back
Top