Skip to content
Advertisement

How to get only comma values in SQL Server

I have a employee table and I am trying to get only comma values in SQL Server.

Emp table:

Eid Ename
1 Peter,J
2 Mike,S
3 ,
4 ,,,,,,

I tried this code:

I am not getting the length 0 if the values contain only commas.

Expected result: I want only 3 and 4 emp ids.

Advertisement

Answer

The answer there is condition line “where ….”

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement