abhijitag
11th January 2002, 16:13
hi

one more question !

on my site i have one interface (4gl program) which reads an ascii file in fixed format and makes inventory transfer or production receipt depending on the type of record read.

but commit is made after completion of production receipt and inventory transfer combination for one record

for example ,

i make production receipt for one item X in warehouse 100
record is inserted in table tdinv100 but not commited.

now i want to transfer the same quantity from 100 warehouse to 110 warehouse for same item

for that purpose i select max(tdinv100.sern) from tdinv100
and add 1 to it to get next sern

this works fine when there is production receipt for the same item in the same warehouse on the same date

if there is no such record in tdinv100 for the same date then this select doesnt work it just throws me out of that function and terminates program abruptly

i think it has something to do with max aggregate function which will work only on data which is in table and not on the data which is in buffer

will as set with 1 rows work with buffer and data both ?

i want to clarify this point

lbencic
11th January 2002, 16:25
The "as set with 1 rows" is just an extension of your select statement. If the select does not read into the buffer, adding the "as set.." will not change that situation