My query is something like this:-
I need to perform this join only if any of the a,b,c,d values are NULL in table t1.
And if they are null , i do a lookup for them in table t2.
Select a,b,c,d from table t1,table t2 where t1.a=t2.a OR t1.b=t2.b AND t1.c=t2.c OR t1.d=t2.d.
I perform this query using a tMap .
How can i do this in my expression builder. Is it possible to have OR operator across joins being made for various columns?
Hello aviator,
remove tMysqlInput_3. You don't need it in my example. Select your data from your "8-million-table" in tMysqlInput_2 with a dedicated sql. In the tMap you need only one input and one output.
Bye
Volker
Hi Volker,
Is this what u are saying(attached an image below.)
The problem is , my query for mysqlinput_2 would be something like this:
"select track_aol_id,track_title,track_number,album_aol_id,
album_title,artist_aol_id,artist_name from audio_main_song
where
track_title=row8.trackTitle OR track_aol_id=row8.trackAolId
AND
artist_name=row8.artistName OR artist_aol_id=row8.artistAolId
And
album_title=row8.albumTitle OR album_aol_id=row8.albumAolId limit 1"
Can i refer row8 fields here ??? (The rejected values) because i need to have them in my where clause while doing a lookup in my "8 million table"
I get a error when i do this----->
Exception in component tMysqlInput_2
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'row8.trackTitle' in 'where clause'
Also in my tmap : apart from the fields that i am getting from mysqlinput_2, i need row8's rejected fields also (not all of them are null)
Can i do that ??
Any inputs please ?