How to find next line character in teradata?

Member

by aubrey , in category: MySQL , 6 months ago

How to find next line character in teradata?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by dalton_moen , 6 months ago

@aubrey 

In Teradata SQL, the newline character is represented by the ASCII code 10. To find the next line character in a string, you can use the ASCII function to determine the position of the newline character in the string.


For example, you can use the following SQL query to find the next line character in a string:

1
2
SELECT POSITION(CHAR(10) IN 'This is a string with a newline character
') AS newline_position;


This query will return the position of the newline character in the string 'This is a string with a newline character', which in this case is 29.

Related Threads:

How to find invalid utf-8 character in oracle column?
How to find duplicates from multiple tables at once in teradata?
How to find the total number of columns in a table in teradata?
How to calculate previous month data on starting of next month in teradata?
How to add date in teradata?
How to implement lag function in teradata?