Hi @RAVI
1) How To Find In SQL Table Column First Record Has Space Or Not
CREATE TABLE #TEST1 (Column1 VARCHAR(20))
INSERT INTO #TEST1 VALUES ('Item1'),(' Item2'),('Item3'),(' Item4'),('Item5')
SELECT Column1 FROM #TEST1
WHERE SUBSTRING(Column1,1,1)=' '
2) How To Find In SQL Table Column Which Has More Then One Space In Word
CREATE TABLE #TEST2 (Column2 VARCHAR(20))
INSERT INTO #TEST2 VALUES ('It em1'),('I te m2'),(' It em3'),('It e m 4'),(' Item5')
SELECT Column2 FROM #TEST2
WHERE LEN(REPLACE(Column2,' ','')) < LEN(Column2) - 1
Best regards,
LiHong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.