I have a SQL table and I am I trying to select the below fields where either value1 or value2 are NOT empty. value1 and value2 will either contain text, or it may contain " " as in nothing, or it may be <null>. I tried using the below to check the datalength but that doesnt seem to work.
Is there a function similar to NOT NULL that instead of null it looks for that blank space?
SELECT value1,value2,RequestStatus, CONVERT(SMALLDATETIME, RequestDate, 103) as datetobewritten FROM TABLENAME WHERE datalength(value1) > 0 OR datalength(value2) > 0