Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Toshkin
Starting Member
4 Posts |
Posted - 2004-09-22 : 06:17:36
|
I have a table 'tblUsers' that consists of the following UserCode (int increments by 1 init val 0)UserLogon (JDOE) Password (abc123)U_Title (Mr.)U_Givenname (John)U_Lastname (Doe)U_Location (SMT Line 1) I would like to create a query/view which produces a column 'LogonAs'instead of the last four columnswhich combines them in this order U_Title, U_Givenname,' ',U_Lastname,'(',U_Location,')'So when it is run it produces the following out come for each rowUserCode UserLogon Password LogonAs 0 JDOE abc123 Mr.John Doe(SMT Line 1)1 etc...2 etc... I hope someone can help as it would make it alot easier to code the frontend app in vb .net.F@#$ this it is doing my head in Im going to seek help at SQLTEAM.COM forumCheers Toshkin!!! |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2004-09-22 : 06:58:57
|
| select U_Title + U_Givenname + ' ' + U_Lastname + '(' + U_Location + ')' as LogonAS from tblUsers |
 |
|
|
Toshkin
Starting Member
4 Posts |
Posted - 2004-09-22 : 07:35:48
|
quote: Originally posted by RickD select U_Title + U_Givenname + ' ' + U_Lastname + '(' + U_Location + ')' as LogonAS from tblUsers
Thanks I knew I was doing something wrongCheers Toshkin!!! |
 |
|
|
|
|
|