User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 397,800 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,394 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 3252 | Replies: 4
Reply
Join Date: Aug 2006
Posts: 3
Reputation: x067844 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
x067844 x067844 is offline Offline
Newbie Poster

Help Column Aliases

  #1  
Aug 29th, 2006
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:
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2006
Posts: 7
Reputation: itsdavetime is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
itsdavetime itsdavetime is offline Offline
Newbie Poster

Re: Column Aliases

  #2  
Sep 1st, 2006
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.
Reply With Quote  
Join Date: Aug 2006
Posts: 3
Reputation: x067844 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
x067844 x067844 is offline Offline
Newbie Poster

Re: Column Aliases

  #3  
Sep 1st, 2006
Originally Posted by itsdavetime View Post
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
Reply With Quote  
Join Date: Aug 2006
Posts: 7
Reputation: itsdavetime is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
itsdavetime itsdavetime is offline Offline
Newbie Poster

Re: Column Aliases

  #4  
Sep 1st, 2006
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.
Reply With Quote  
Join Date: Aug 2006
Posts: 3
Reputation: x067844 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
x067844 x067844 is offline Offline
Newbie Poster

Troubleshooting Re: Column Aliases

  #5  
Sep 14th, 2006
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).
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 6:02 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC