How do you Loop through Columns
431129Nov 22 2004 — edited Nov 22 2004Hello All,
Here is my problem. I have a select statement that returns about five (5) Columns. For each column in the row fetched I need to do some validation, if it fails the validation I will insert records into a table and go to the next column. I have it now with a bunch of If statements and inserts to the Table five times in my procedure. I was thinking looping through the columns and doing the Insert through the Loop instead of having it in five different places. Any ideas of how I can accomplish this?