I have two columns and i wanted to display all the combinations of a single columns
Table 1
column1 | column2 |
---|---|
value | 145 |
value | 146 |
value2 | 13 |
value2 | 56 |
value2 | 364 |
I have used selfjoin, but that doesnot workout.
SELECT a.column1 FROM table1 a CROSS JOIN table1 b where column1="value"
Any suggestions would be appreciated
2
Answers
Check this solution:
Now Full SQL Code:
Update : I changed the column2 datatype to (INT).
Screenshot I got:
Update2 requested from OP:
few of them doesnot get concatinated and having this. is it possible to use case condition as well for ex: