Skip to content
Advertisement

Multiple Join not working on two string attributes

I have the following issue:

I have several tables in my Database, in order to check for a specific criteria I have to join several tables, where I use the following statement:

This statement fails. But when I remove one the following two join-conditions in the last Left JOIN, it works as intended:

F.risk = table10.risk and/or C.v_type = table10.v_type

They are both of type CHAR, whereas series is type TINYINT, I guess it has something to do with joining on multiple conditions with strings, but I’m not able to find a workaround, any ideas?

Advertisement

Answer

according to your current SQL, Table C is not visible as it’s a sub query within F. instead of C.v_type you need to use F.c_v_type and the c_v_type field must come from C table like. select v_type as c_v_type from table3... as C

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement