Check for spaces in column
In a sql server 2008 r2 database column that is defined as varchar, how do you check to see if the field contains all spaces regardless of the length the field is?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Oct 6, 2012, 1:57 PM EDT
SELECT someColumn FROM table WHERE RTRIM(someColumn) = ""
or, if you don't want to include columns containing empty strings:
Abdu RafeeqRank #2,262 · 623 reputationPosted Oct 9, 2012, 8:35 AM EDT