I have a table where the data looks like below:
col1| col2 | col3
101 | AA AB | AAAA
102 | ACA B | AAAA
103 | ACBA | AAAA
104 | ABCD | AAAA
What I am trying and need is, select all the records that have a space in col2, from the above example, my select should return both 101 and 102. The space isn't a fixed field, it can be in any character.
Select * from tableA where col2 like '% %'
this does not help me as the '%' will start fetching all records, if I have to use a function substring then my space needs to at a fixed position, which is not in this case.
any suggestions, please