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 GandhiRank #545 · 4.5K reputationPosted May 24, 2019, 4:04 AM EDT
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.
Anoop Kumar SharmaRank #127 · 17.4K reputationPosted May 10, 2019, 10:04 AM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted May 13, 2019, 11:13 PM EDT
Ramon QuintanaRank #3,303 · 435 reputationPosted May 13, 2019, 5:55 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted May 13, 2019, 8:56 AM EDT
Ramon QuintanaRank #3,303 · 435 reputationPosted May 24, 2019, 5:23 AM EDT
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 <> ' '.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts