You can translate the question and the replies:

Need to find Pipe character in a column value

I need to find the Pipe character ( | ) in the column value of a field in a view. This is the SQL I am using for my query, however I am not having luck in the reults: SELECT * FROM "My_View" where instr(my_column,'|') <> 0 Please let me know the correct SQL to use. Thanks,
24-09-2017 20:15:31 -0400

1 Answer

Hi, I would follow one of the below syntax in order to return the value of the column that contains the ‘|’ character. ``` SELECT * FROM <view_name> where instr(<column_name>,'|') <> -1 SELECT * FROM <view_name> where instr(<column_name>,'|') >= 0 ``` The INSTR function returns the index of the specified character in a particular column. If the character doesn’t exist, it returns -1. So, the above query returns the rows where the column contains ‘|’ character at any position of the string. You can have a look at the [INSTR]( section of Virtual DataPort VQL guide for more information. Hope this helps!
Denodo Team
26-09-2017 01:11:55 -0400
You must sign in to add an answer. If you do not have an account, you can register here