Skip to content
Advertisement

SQL CASE with multiple join

I am trying to run a sql select code as below. I am trying to fetch the trans_date which will either be in asutrans or asuhistr. But the below code doesnt give me any value and nor does it fail.

Do you think we can use CASE statement like that?

If I run the codes separately, then it does give me the result from asihistr. As below-

Advertisement

Answer

You cannot have case statement which checks voucher_no because you are already joining in the join query. I think this is what you’re expecting:

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