I am using MySQL. I am getting two field values A,B as number. I need to create field value C as comma separated values from A to B.
For example, I have three columns A,B and c. A value is '1'. B vales is '5'. I need to get C value as '1,2,3,4,5' in sql query.
Actually, I want to get the "stopped machine report" from multiple table. I have stored the values as from_machine = 1 and to_machine = 5 (Its my mistake). But there is no machine name as 3. If I get count as (to-from-1) it gives 5; But the answer should be 4. That's why I need. If I get this, I could check as IN or NOT IN('1','2','3','4','5').
Please any one give me a solution. Thanks in advance.