Author |
Topic |
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2005-03-16 : 08:43:21
|
In oracle..select initcap('abcd') from dual;returnsAbcdDo we have a similar function in SQL2K? How to achieve this...------------------------I think, therefore I am |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-16 : 08:46:20
|
no you must doselect upper(left(colName, 1)) + substring(colName, 2, len(colName)) as colNameGo with the flow & have fun! Else fight the flow |
|
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2005-03-16 : 08:51:46
|
OK. Thanks for the code. As long as there is way to do it..its OK with me. Had seen the same function in foxpro...that is long back....------------------------I think, therefore I am |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-16 : 08:53:56
|
way long back... Go with the flow & have fun! Else fight the flow |
|
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2005-03-16 : 08:57:13
|
Yep. ...loved foxpro..sort of created a big wave...that time.------------------------I think, therefore I am |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-16 : 09:03:57
|
i didn't. worked with it in 96... one of the first incarnations...left it alone from then on Go with the flow & have fun! Else fight the flow |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-03-16 : 09:24:34
|
Do you just want a single initial CAP? Or Were You Looking For Title Caps?Kristen |
|
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2005-03-16 : 09:41:38
|
Just want a single initial cap....but would love to see a code which is doing title caps...------------------------I think, therefore I am |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-03-16 : 10:43:10
|
Several examples on SQL Team ... which saves me a job!Kristen |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-03-16 : 10:51:28
|
You Tease!Be One with the OptimizerTG |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-03-16 : 11:10:16
|
"Several examples on SQL Team" is always a safe bet around these parts. If I'm wrong we'll just have to set it up as a Challenge!Kristen |
|
|
sql_cable_guy
Starting Member
1 Post |
Posted - 2005-05-09 : 07:54:48
|
hmm Title caps.. Have to think about that one A previous response select upper(left(colName, 1)) + substring(colName, 2, len(colName)) as colName works with 'abcd'This works with 'ABCD' or 'abcd' to give you initcap.select upper(left(lower(colName), 1)) + substring(lower(colName), 2, len(colName)) as colName |
|
|
|