0

I am new with SQL Server 2005. Is it possible to store a column ALIAS at time of table creation? User wants business name and cryptic alias.:mrgreen:

2
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by x067844
0

Not sure what you mean when you ask if you can store the column alias when you create the table. A column alias can be assigned when you perofrm a query on the table.

0

Not sure what you mean when you ask if you can store the column alias when you create the table. A column alias can be assigned when you perofrm a query on the table.

My wish is to store assigned aliases for all tables and columns so that users can use them consistently and as column headings in reports

0

I don't believe there is a way to store a column alias with a table. If you really need to do this, I'd suggest creating a table of aliases which relate back to the original column and table name. Then have the user use stored procedures or views to access the data, which would relate back to this new table, thus giving you the alias rather than the actual column names.

0

I think I have found a solution, but I need this confirmed. In Visual Studio 2005, I was able to create a view for one table and use aliases for the columns in the query. I need to do this with multiple tables in the same view. The problem is I'm not too familiar with Visual Studio and the view query is created with a CROSS JOIN statement (whatever that is).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.