sql server - how to insert record in between particular record in SQL -
suppose have customer balance details table. example :
custid custname custdate amt bal 1 dp 1/5/2013 1000 1000 1 dp 5/5/2013 100 1100 1 dhara 10/5/2013 1000 1000 1 dp 10/5/2013 1000 2100 now user insert record custname = dp , custdate = 7/5/2013 , amt = 400 record should added after date 5/5/2013 , before 10/5/2013 , respective balance should change follows :
custid custname custdate amt bal 1 dp 1/5/2013 1000 1000 1 dp 5/5/2013 100 1100 1 dp 7/5/2013 400 1500 1 dhara 10/5/2013 1000 1000 1 dp 10/5/2013 1000 2500 how achieve when inserting record in database ? how check when date lies between inserted records ? please help
i think, can want if use order clause access data in desired order. please refer db documentation use of indices.
Comments
Post a Comment