Harreni
asked on
Single repository table for all T-SQL coulmns aliases
Hi Experts,
- I want to have a master table for all columns aliases that exists in my stored procedures so, I can change the alias in one place instead of changing it in each stored procedures, because my data is in Arabic language and my table columns names are in english language and want to display the columns names in Arabic.
Please provide me an example in how to achieve that?
Thanks a lot
Harreni
- I want to have a master table for all columns aliases that exists in my stored procedures so, I can change the alias in one place instead of changing it in each stored procedures, because my data is in Arabic language and my table columns names are in english language and want to display the columns names in Arabic.
Please provide me an example in how to achieve that?
Thanks a lot
Harreni
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Agreed. SQL server does not have an automated way to utilize multiple object name aliases in code, so If this means that much then perhaps the table and column names should be changed to Arabic.
ASKER
Thanks a lot Docteur_Z & Jim for your replies.
Mr. Jose,
What's the benefit from creating a view for my stored procure? Why not directly modify the stored procedure instead?
Mr. Jose,
What's the benefit from creating a view for my stored procure? Why not directly modify the stored procedure instead?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Vitor's example is spot on.
ASKER
Thanks a lot experts.
What your asking is to make every statement in your stored procedures to be dynamic.
Keep stored procedures static, read the dictionnary in your application - in an array for example, then map the column names to the dictionnary in your application.