Hi Divya,
are you trying to replace slash in the middle? ltrim will do the
replacement at the begging of the string. If yes, you might new
regexp_replace function.
select '/abc', ltrim('/abc', '/') from (values(1));
-------------------------------------------------------------------------------------
| EXPR$0<VARCHAR(REQUIRED)> | EXPR$1<VARCHAR(REQUIRED)>
|
-------------------------------------------------------------------------------------
| /abc | abc
|
-------------------------------------------------------------------------------------
select 'a/bc', regexp_replace('a/bc', '/', '') from (values(1));
-------------------------------------------------------------------------------------
| EXPR$0<VARCHAR(REQUIRED)> | EXPR$1<VARCHAR(REQUIRED)>
|
-------------------------------------------------------------------------------------
| a/bc | abc
|
-------------------------------------------------------------------------------------
Kind regards,
Arina
Post by Divya GehlotHi ,
I haven't upgraded to Drill 1.14 yet .
Here is the query and data
SELECT `IP_Subnet`,LTRIM(`IP_Subnet`,'/') AS Subnets FROM
`tmp`.`default`.`./mapping/` ;
The LTRIM not working on special characters :(
IP_Subnet
Subnets
10.128.18.0/23 10.128.18.0/23
10.128.20.0/24 10.128.20.0/24
10.128.36.0/23 10.128.36.0/23
10.128.86.0/23 10.128.86.0/23
10.128.18.0/23 10.128.18.0/23
Thanks,
Divya
Post by Karthikeyan ManivannanHi Divya,
Can you please post your query and and an example of the column data. And
have you tried this on Drill 1.14 ?
Thanks.
Karthik
Post by Divya GehlotHi,
I am using Drill 1.10
My apologies if My query is naive .
One of the table column field has special character like '/'
when I am doing RTRIM on it to just get the data before the '/' , it's
not
Post by Divya Gehlotworking :(
Appreciate if anybody know how it works in Apache Drill !
Thanks,
Divya