-
Truncating String in sql query
Hi,
I'm having one location table where the values of location are returned as KC_KansasCity,CHAR_Charlotte,PEW_Pewauke etc,I want to truncate the characters before underscore and also underscore while inserting the data into table.
i.e for Eg:I've to ignore KC_ and insert only KansaCity into the table.
Can anybody advise me on how to do this..
Thanks,
Anil
-
Use something like this:
select
substr('CHAR_Charlotte', instr('CHAR_Charlotte', '_', 1)+1)
from dual;
I'm assuming a single underscore in the names.
J
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
|