Select Columns Only if String length is greater than 2
- by Zee-pro
Similar Question may be asked but I am unable to find anything that fits my needs.
How can I select only columns where string length is greater than 2
This is how much has done yet.
SELECT * FROM Table1
WHERE (Table1.ID = @ID)
Or something like
WHERE (Table1.ID = @ID) AND (LEN(*) > 2)
Thank for all of your help
I have a Table, in which I have 35 columns and a User ID column, now I want to select and display information from only those columns which have 2 string.
I Like to Select only columns which have 2 string and the defined ID by User not the Whole Row !!
I hope I am making sense.
Table
Desired Result
DI 35
Lesson 4 Maths
Lesson 9 ICT
Lesson 12 English