Here's the question: How can I create a dynamic column alias using a user defined variable? For example I am creating reports where the column names of the report must be in the user's selected language. So before I fill my out cursor with a select statement, I gather the appropriate translation for the aliases into a variable. The appropriate piece of the proc looks something like this (haven't actually written it yet so suggestions on other methods are appreciated)
SELECT rpt_col_name INTO v_translated_name FROM col_descr WHERE c_lang='E' and db_field_name="Asset Class";
Open out_cursor For
Select Field_Name v_translated_name from table_name ....
And I want the value of the variable to print as the alias, not "v_translated_name".
Thanks in advance
Thessa
SELECT rpt_col_name INTO v_translated_name FROM col_descr WHERE c_lang='E' and db_field_name="Asset Class";
Open out_cursor For
Select Field_Name v_translated_name from table_name ....
And I want the value of the variable to print as the alias, not "v_translated_name".
Thanks in advance
Thessa