Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Remove characters after "-" in Teradata

Suppose we have a field which is having a char/varchar value '375472336257-2'

If we want remove the characters after '-' then, the SUBSTRING function can be written as
SELECT SUBSTRING(myField,0,POSITION('-' IN myField))  FROM table


Working example:
SELECT SUBSTRING('375472336257-2',0,POSITION('-' IN '375472336257-2'))

Output:
375472336257