Wednesday, 11 September 2013

Creating a query to display counts of specific results from a longtext field

Creating a query to display counts of specific results from a longtext field

Hello firstly I am a SQL newb and need a little help. I could not find a
question exactly like mine.
(select count(*) from table where Column_x like '%text1%')
(select count(*) from table where Column_x like '%text2%')
(select count(*) from table where Column_x like '%text3%')
So I want the search to return
case 1 | Case 2 | Case 3
xtimes ytimes ztimes
Any help would be great, either just display a queried result or creating
a temporary table.
Cheers,

No comments:

Post a Comment