MS SQL 2012 SELECT without "empty" records
Posted on 2013-11-19
I'm trying to SELECT into a new table where a particular column contains data which ignores the rows where a certain field is empty/null/whatever!
I've tried various ways, including the following:
WHERE student_support_number IN (SELECT student_support_number FROM T_1213_SSN);
WHERE student_support_number Is Not Null OR student_support_number <> '';
WHERE student_support_number Is Not Null OR len(ltrim(student_support_number)) <> 0;
I've read around and think the field will be empty rather than Null, but none of these are working and I end with a load or rows where the student_support_number (nvarchar) has nothing in it.