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 |
|
mhg1063
Starting Member
27 Posts |
Posted - 2004-03-30 : 12:55:29
|
| Hello AllI have a few tables where the columns are mixed case. When creating a view if I'm selecting all the columns how can I use the lower function to get the columns lowercase, with out listing each individual column.Ex. I don't want to do SELECT lower(loan_id), lower(loan_amount) FROM loanI want to do something like SELECT lower(*) from loan.Thanks in advance for any input. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-30 : 13:01:16
|
| You can't do that. Also you should NOT use SELECT *. You will receive a performance hit with SELECT *. In a SELECT, explicitly state which columns you want.SELECT Column1, Column2FROM Table1So if you want LOWER:SELECT LOWER(Column1), LOWER(Column2)FROM Table1Tara |
 |
|
|
mhg1063
Starting Member
27 Posts |
Posted - 2004-03-30 : 13:22:39
|
| Thanks, its as I expected. If the table only has primary key constaints I could simply change all columns to lowercase with sql. I don't for see any problems converting the column names. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-30 : 13:59:13
|
| I don't understand what you mean about primary key constraints. Using the LOWER function in a SELECT, just changes the display of the column. It does not change the data.Tara |
 |
|
|
|
|
|