Quantcast
Channel: Baanboard.com
Viewing all articles
Browse latest Browse all 4216

can anyone help me with this?

$
0
0
let me tell you what i want to do is
for example
i have a product name "A"
table in database consist of three fields(product_name,product_effective_date,product_expiry_date)
so when user enter details for first time of product A then :
A 29/10/2019 5/11/2019
then second time when user again enter detais for same product then expiry date of previous record of product should be effective date of current
for example:
second time i am entering details of A
A 1/11/2019 31/11/2019
then previous record should be looks like:
A 29/10/2019 1/11/2019

field.tdcus103.effd(effective date):
after.input:
select tdcus103.effd:effd
from tdcus103
where tdcus103._index1 = {:tdcus103.pcck}
order by tdcus103.effd desc
as set with 1 rows
selectdo
endselect

select tdcus103.*
from tdcus103
where tdcus103._index = {:tdcus103.pcck}
and tdcus103.effd < effd
order by tdcus103.effd desc
as set with 1 rows
selectdo
tdcus103.dffd(expiry date) = effd
db.update(ttdcus103,db.retry)
commit.transaction()
endselect

Viewing all articles
Browse latest Browse all 4216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>