As per my understanding IsNull Function checks the first value if its null or blank then it returns the next value.
SELECT ISNULL(1,getdate())
but the above statement is giving error. Can any one help to highlight the reason?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Implicit conversion from data type datetime to int is not allowed, make the first value a char
BTW, just be aware that ISNULL is not ANSI is proprietery and only accepts 2 parameters, COALESCE accepts a lot more
This statement below is incorrect
it doesn’t care for blanks
run this
another difference between ISNULL and COALESCE is that ISNULL will return the same length as the first parameter
run this