Sorry rajabalachandra, I have no idea what you are trying to do . . . .

Perhaps you could restate your problem with an example of a table to be processed and the result you want?