I have table in Teradata SQL like below:
col1 col2
Jan Kowal | Jan Kowal PHU
Bravo JohN | GB John BraVo
Ann Still | Ronald G
And I need to select only these rows from above table where:
- In col2 is value from col1 + something more (nevermind before or after)
- Be aware that Jan Kowal and Kowal Jan is name and surname and it could be commutative
- Case = False (nevermind whether letter are high or small)
So I need to select only first and second row:
col1 col2
Jan Kowal | Jan Kowal PHU
Bravo JoHN | GB John BraVo
- Because both rows have value from col1 + something more (before or after) in col2
- Case of letter = False
- name and surname and it could be commutative