Guest User

Untitled

a guest
Oct 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. SELECT Emp_NUM, Full_name, Mother_Name, Date_of_Birth, Province_of_birth, Job
  2. FROM [Emp Main Table]
  3. WHERE (Full_name LIKE '%' + @Full_name + '%' OR Full_name IS NULL) AND
  4. (Mother_Name LIKE '%' + @Mother_Name + '%' OR Mother_Name IS NULL) AND
  5. (Date_of_Birth LIKE '%' + @Date_of_Birth + '%' OR Date_of_Birth IS NULL)
  6.  
  7. SELECT [Emp_NUM]
  8. ,[Full_name]
  9. ,[Mother_Name]
  10. ,[Date_of_Birth]
  11. ,[Province_of_birth]
  12. ,[Job]
  13. FROM [Emp Main Table]
  14. WHERE ([Full_name] LIKE '%' + @Full_name + '%' OR @Full_name IS NULL)
  15. AND ([Mother_Name] LIKE '%' + @Mother_Name + '%' OR @Mother_Name IS NULL)
  16. AND ([Date_of_Birth] LIKE '%' + @Date_of_Birth + '%' OR @Date_of_Birth IS NULL)
  17.  
  18. rtrim(coalesce(@Full_name, '')) = ''
  19.  
  20. @Full_name is null
Add Comment
Please, Sign In to add comment