Maahi

Maahi

  • NA
  • 73
  • 7.4k

Sql Script for blank values

Sep 9 2017 3:48 AM
I have uploaded a bulk data having 20 columns.
 
in SQL am trying to bind 3 column join against the employee master.
 
For Example
 
select * from #temptable
 
select  tmp.*
 from #temptable tmp , employeemaster em
where em.employeeno= tmp.Employeeno1 and
           em.employeeno= tmp.Employeeno2 and
          em.employeeno= tmp.Employeeno3 
 
the above query will return  records if all the condtion are matched in the where clause.
But lets say am passing the value only for  tmp.Employeeno1 =123 and tmp.Employeeno2=456
and tmp.Employeeno3 as empty record.
Its a valid records how can i allow it in my script using blank or null values. 

Answers (2)