Hello to everyone.
I´m writing because I have a problem extracting the last value of a field
the code that i wrote is similar to this one
SELECT
,substring(RUT,1,length(RUT)-1) AS TEST_1
RUT
FROM TABLE1
the result that i need should look like this
Keep in mind that RUT is INTEGER so i don´t know is that could be a problem.
I have to do this First in Database before i even work in the workflow.
Regards.
Solved! Go to Solution.
@neromerob @Can you covert the RUT field to char type and try again?
@neromerob, this is how you can do it. As your column is INT datatype you need to convert into STRING which can be done using str function.
select RUT,substring(str(RUT),1,len(str(RUT))-1) as Test_1 from Table_1
I hope that helps!
Thanks!