sql - Select an ID if count is equal to 1 -


I am trying to write a query, which results in the identification number based on only 3 WHERE values ​​1 .

Then say I want to find a patient's id and my section first name , last name and < Code> Date of Birth . If there are 2 results of duplicates, then I need to have the outlet zero and return the patient ID.

  If (select the count (*) from the patient where last_name = 'James' and First_name = 'jones' and birth_DtTM = '1980-01-01');  

Div class = "post-text "Itemprop =" text ">

  count (*)> 1 'NULL' and 'Pat_ID1' Finally, from the patient where the last_name = 'James' and first_name =' Jones' and birth_DtTM = '1980-01-01' Group by Pat_ID1 ' 
< / Html>

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -