Hi you people,
I need to join two tables with only one condition that not to list records with NULLS values in a specific field in both tables, but my query in a never ending one, there is no compiled errors when i try to run it.
here my query:

after run this query it seem to be in a loop duplicating the data, i have to stop it.
Some recomend acction, or clause on it?
Thank..

Nirav GandhiPosted May 24, 2019, 8:04 AM
You have already mentioned “trans_type” in Inner join. so not need to write isnull() condition on where clause. By default, Inner join will eliminate NULL values.
Now please remove Isnull condition in “Where” clause and check the output.
Ramon QuintanaPosted May 24, 2019, 9:23 AM
INNER JOIN [1RQ_BPCSQL1].[dbo].[ProcesoReporteSQL] ON Cuentas_Maestro.trans_type=ProcesoReporteSQL.Trans_Type
where ISNULL(cuentas_maestro.trans_type,'') <> '' and cuentas_maestro.Numero_cuenta between ProcesoReporteSQL.F33 and ProcesoReporteSQL.F34 and ProcesoReporteSQL.trans_type <> ' '.
Jignesh TrivediPosted May 14, 2019, 3:13 AM
Amit GuptaPosted May 13, 2019, 12:56 PM
Ramon QuintanaPosted May 13, 2019, 9:55 AM
Anoop Kumar SharmaPosted May 10, 2019, 2:04 PM