|
-
sql help
In Dept table, In "dname" field I have chr(10) and spaces. I want to remove the Front chr(10) and spaces.
I know that, If I want to replace all chr(10)'s and spaces in that field I can use
select ltrim(rtrim(replace(dname,chr(10),''))) from dept;
But I don't want to remove carriage returns in middle of the data.
I want to remove only if front of the data.
Example Data:
Dname
------
chr(10) space space Finance chr(10) Department
chr(10) space chr(10) space chr(10) chr(10) IT chr(10) Department
The Change I want to do
Dname
------
Finance chr(10) Department
IT chr(10) Department
Is their any sql function I can use or Do I have to use plsql
procedure with cursor. Any suggestion will help me. Thanks Guys.
sree
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|