Hi !
I have a table with 2 columns: cola, colb.
In cola i have alphabetic characters: "a", "b", "c"...
and in colb i have digits: "1","2","3","4"...
I'd like to display all the digits in colb that match a letter in cola : a 1, a 3, a 9.... one row per letter. Means, first row in my select query will yield the letter a plus 1, 3, 9 following it (a letter can have at most 3 equivalent digits).
My code is:
The code is wrong of course and i wish someone could show me how to do it right !
Thanks a lot !
I have a table with 2 columns: cola, colb.
In cola i have alphabetic characters: "a", "b", "c"...
and in colb i have digits: "1","2","3","4"...
I'd like to display all the digits in colb that match a letter in cola : a 1, a 3, a 9.... one row per letter. Means, first row in my select query will yield the letter a plus 1, 3, 9 following it (a letter can have at most 3 equivalent digits).
My code is:
Code:
select a.letter, b.digit1, b.digit2, b.digit3
from
mytable as a inner join mytable as b
on
a.letter=b.letter
Thanks a lot !