0

I Have String of groupIds(column Name) like '30,31,47' and I want separate report list who have 30 groupId, who have 31 groupId, who have 47 groupId using MySQL query (in single query)

I have this table and I want

groupId-30 : reportId -10,45 ,
groupId-31 : reportId-10,44,45 ,
groupId-47 : reportId-10,45

I tried using FIND_IN_SET , like, in but not getting result what I want.

Jaap
  • 81,064
  • 34
  • 182
  • 193
  • 1
    Don't save CSV in a column http://stackoverflow.com/questions/41304945/best-type-of-indexing-when-there-is-like-clause/41305027#41305027 http://stackoverflow.com/questions/41215624/sql-table-with-list-entry-vs-sql-table-with-a-row-for-each-entry/41215681#41215681 – e4c5 Feb 17 '17 at 07:57
  • But I have csv values and I want same result.So please help me. – Amol Birajdar Feb 17 '17 at 08:03
  • 1
    _I store my data the totally wrong way, and now I'm having problems using it. It's complicated/difficult/too slow/doesn't work right! Can someone help?_ The answer is Yes - fix your data so it's stored properly to begin with, and all those problems using it go away. You don't have to optimize difficult things when they're not difficult in the first place – e4c5 Feb 17 '17 at 08:03

0 Answers0