|
|
|
Junior Member
      
Group: Forum Members
Last Login: 3/27/2008 11:31:18 AM
Posts: 19,
Visits: 25
|
|
Guys,
can any one let me know how to check the newline character in a given varchar/char field in teradata?
ex:
i have a text column in a teradata table which can hold 10 characters. I need to check if there is any newline() exists in that field.
Thanks,
Sparan
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/12/2008 9:19:53 PM
Posts: 469,
Visits: 463
|
|
SELECT * FROM MyTable
WHERE MyCharCol LIKE '%' || x'0A' || '%'
;
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 3/27/2008 11:31:18 AM
Posts: 19,
Visits: 25
|
|
Thanks a lot! It works for me.
Can you tell me what is x'OA' is? Is it a hexadecimal value for new line character?
Thanks,
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/12/2008 9:19:53 PM
Posts: 469,
Visits: 463
|
|
|
That's correct, it's the same as the ASCII value for newline in hex.
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 3/27/2008 11:31:18 AM
Posts: 19,
Visits: 25
|
|
it would be great if you can send doc/link to get the equivalent HEX for all the invisible characters ( like \r,back space,tab ...etc).
Again thanks a lot for your help.
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/12/2008 9:19:53 PM
Posts: 469,
Visits: 463
|
|
that's only a bit of googling away
here's one ......
http://www.asciitable.com/
|
|
|
|