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:

Recommended Answers

All 4 Replies

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.

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

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.

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).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.