Select Columns Only if String length is greater than 2
Posted
by
Zee-pro
on Stack Overflow
See other posts from Stack Overflow
or by Zee-pro
Published on 2012-09-15T08:47:32Z
Indexed on
2012/09/15
9:38 UTC
Read the original article
Hit count: 225
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
© Stack Overflow or respective owner