Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ezhov-da/e50f4d7838072ff636598c1a655fcd54 to your computer and use it in GitHub Desktop.
Save ezhov-da/e50f4d7838072ff636598c1a655fcd54 to your computer and use it in GitHub Desktop.
sql teradata получение частей строки
SELECT
STRTOK('12/4/2016','/',3) || '-' ||
SUBSTR('00'||STRTOK('12/4/2016','/',2),LENGTH('00'||STRTOK('12/4/2016','/',2)) - 1,2) || '-' ||
SUBSTR('00'||STRTOK('12/4/2016','/',1),LENGTH('00'||STRTOK('12/4/2016','/',1)) - 1,2) AS D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment