Reading from array

Hi,
I have an array like below...

Table[0]="table1"
Table[1]="table2"
Table[2]="table3"
Table[3]="table4"
.....
Table[n]="tablen"

I want to retireve the values from the array and need to pass this to a db2 command to create a view like below.
the number of values in the array will vary

CREATE VIEW table AS
 SELECT col1, col2,col3
  FROM Table[0] A0, Table[1] A1 ...Table[n]

any help..

See if this helps you:

sed 's/.*=.//;s/"//;s/table\(.*\)/table\1 A\1,/' File