• having difficulty in SP or query to carry out this operation.