how to find records in a table which contains same value in some field after finding insert to another table in a single record

Hi All,

I have a table which is look Like below

CatoID OrderNo CustomerNo UID BatchNo Quantity

1008 1032 XAR/02 123 0.26

1008 1032 XAR/02 65463 1.5

1009 1032 XAR/02 123 0.26

1010 1032 XAR/02 123 1.1

Now I have another table which is Looking Like Below

OrderNo UID BAtchNo quantity

1032 XAR/02 123 1.62

I mean when three fields are same then all quantity fields are added and then Insert multiple record in a single records.

I alrerady searched on google but nothing i found

so pls give me code for this or any good link for this




what do you mean multiple record in a single records…

you want to add all the qty and insert single record instead for 3 records…?

then delete those 3 records and insert only one record…


You mean to say when there is record in second table then program should update other fields of first table

Isn’t it ???

Why don’t you just make the Quantity field in the second table a FlowField that sums the quantity of the related records from the first table?

Hi Anil,

Thank you for your reply,

But i mean to say I have a table, in that table there are four common field order no, Item No, batch no and quantity from the another table. but now i need to write to code

to insert the data in my new table from the another table, In the another table have three same field so if three field data comes more than one time then quantity fields should be become total and ind insert in the new table in a single record.

I am serching for this since a long time but I could’d not get how to do it.

so reply me please.