$ 0 0 I am guessing that it doesn't work because lw_zerate_dtl is empty - your code doesn't appear to fill it. cheersPaul