How can we write if else condition along with with join query in Knime.
For Eg-I have two tables
Table A with columns name,city,addr1,addr2
Table B with columns name,city,addr1,addr2
read the column B.addr2 if below join gives some records
select A.addr1,B.addr1 from
tableA A left outer join
tableB B
on (A.name = B.name and A.city = B.city)
else if above join gives null values, get any data from column A.addr2 before prefix-Ay,Bc,Dt.
You could use a combination of CASE WHEN and SUBSTR() commands in SQL. For further manipulations, you should see what your SQL database would support. You might also try to generate it with generic KNIME DB nodes. Not sure if that would be sufficient.
Thanks ,case when worked exactly what I was looking for:), but one thing substrr() will not work in , as I ma looking for prefix for specif strings, Do we have anything like split function or any regex function?
I have seen you opened another topic for searching specific prefixes. Please link it in the future in order to keep out forum tidy and for users to easier find answers. EDIT: And this topic issue originated from here…
Additionally feel free to mark reply as solution for same above mentioned purposes.