Hi Nijisha,
It's obvious that the result will not return with NULL values because SQL does not understand NULL value while comparing using equal operator (=).
Can you please try ISNULL while comparing in join ?
Something Like
CostAccounts ON Isnull(VoucherDetail.costaccount,0) = Isnull(CostAccounts.ID,0)
Please let me know if you have any concern or query or if I am missing something.
Thanks
Advay Pandya