Toggle navigation
Log in
Sign Up
Log in
Sign Up
Appium
C
C#
C++
Docker
Go
Informatica
Java
JavaScript
Kafka
Numpy
Oracle
Pandas
PHP
Py Spark
Python
R
React Native
Scipy
SFTP
Tableau
Teradata
TGMC
UNIX
Introducing
Radical.sh
Forget Code launches a powerful code generator for building API's
Forget_Code.Models.CategoryViewModel
Add a new snippet
Aggregate Functions
8
BTEQ
76
Collect Statistics
5
CTE
2
Cursor
3
Data Type
3
Date Functions
27
DCL Queries
4
DDL Queries
46
DML Queries
6
Error And Resolution
2
Functions
3
Loaders
3
Macro
6
Math Functions
14
Misc
15
Query Tuning
3
Select Modifiers
56
Snippets
13
String Functions
9
Choose Category
Remove characters after "-" in Teradata
Forget Code
Teradata
Remove characters after "-"
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
Tags for Remove characters after "-" in Teradata
DP_Snippets
DP_String Functions
teradata remove everything after a character
TERADATA REMOVE AFTER
teradata how to substring after a character
teradata function remove a character
substring until a charater sql teradata
substring position in teradata
sql teradata remove char
Contribute to Forget Code, help others.
Add snippet