Filter Data based on codes

Hello,

   I have a question on how to filter the data on multiple columns. The problem is I have one table with 25 columns, 4500 rows. I need to filter out the data based on some codes like 'XXXX', I have 25 codes to check on that table. My requirement is that which ever row has this code I need to create a new column and print that code \(like if a row contains that code need to print that code in new column\). The problem is that we don't know in which column these codes are there, so we need to check each record to filter out the data. Please help me out if you have any solution for this.

Thank you for taking time and helping me out.

Is this a homework assignment? Homework and coursework questions can only be posted in the Homework & Coursework forum under special homework rules.

If you did not post homework, please explain the company you work for and the nature of the problem you are working on. I find the description of your problem ambiguous, so please give us a sample input file, sample codes (including how they are to be found by your script), and the exact output you are trying to extract from that input file based on the supplied codes you have provided. Please also tell us what operating system and shell you're using and show us what you have tried to solve this problem on your own.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.