2 tags for Dynamic SQL
i have couple of questions: how to pass queries in the procedure ( i would be passing different queries at different times) execute them as cursors how to find out the no of coulmns in the cursor and fetch them into strings or array( as no of columns in the queries would be changing each for each call) Please let me know how to do the above things using teradata procedures..... Thanka in advance.......

Until you have Teradata V13 Statistics Wizard Easy Feature available for your Teradata installation, here is a set of stored procedures that will generate and/or run collect statistics statements based on a set of index, column and referential integrity rules.

42 31