Thread: insert record
View Single Post
  #4  
Old 4th May 2011, 07:13
preethish preethish is offline
Member
 
Join Date: Oct 2010
Posts: 38
preethish is on a distinguished road
Baan: baan 4c4 and Lnfp2 - DB: sql - OS: windows2003
hi

Quote:
Originally Posted by alakananda12 View Post
Hi,

I am writing the dummy query for you

Taking the pono as position field and cono as consignment field.
-------------------------------------------------------------
select max(tablename.pono):max.pono
from tablename
where tabllename._index1 = {:tablename.cono}
selectdo
endselect

tablename.pono = max.pono + 1
|* assign the required values to insert in other fields as per your requirement
---------
------
db.insert(tablename,db.retry)

if e then
message("e=%d",e)
abort.transaction()
else
commit.transaction()
endif

-----------------------------------------------
Regards,
Alka
hi Alka,

Thanks for the help.

regards,
Preethish
Reply With Quote