[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Upper/Lower
> >I've noticed there is an upper and a lower function in SQR. Is there a what is
> >sometimes called a 'proper' function that will capitalize just the first
> >character.
>
> If you are using ORACLE you can use the initcap function.
>
Yes, if you are using Oracle you can use Oracle's Initcap function in your
begin-select section. Unfortunately, there is no such a function within
SQR itself -- if you have a $variable, you can't just say
"let $variable_initcap = initcap($variable)".
A workaround is to select from dual -- the code fragment
--------------------------------------------------
let $test_lower = 'hello there everyone'
begin-select
initcap($test_lower) &test_initcap
from dual
end-select
display &test_initcap
----------------------------------------------------
will produce the output "Hello There Everyone".
Hope this helps.
Nathan
----------------------------------------------------------------------------
Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server)
nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/