View Single Post

   
  #1 (permalink)  
Old 02-29-2008, 09:08 AM
T.Kindermann
 
Posts: n/a
Default Advance SQL question


Hello everybody,

i have a advance question about a specific sql problem:

My table A have for example 3 columns.
in the third column are words seperated by ~.


ID COL2 COL3
--------------
1 ab test~dummy~ddd
2 cd testdata2~sjhfdg~sdf
3 ef sd~test
4 gh sd~cv

Now i want two lists:

1.) used Values for column 3:

Values
------
test
dummy
ddd
testdata2
sjhfdg
sdf
sd
cv

2.) used values plus ID
Value ID
----------
test 1
test 3
sd 3
sd 4
cv 4
dummy 1
....

Is it posible to produce such a list with nearly one SQL -Statement or with
temporaly tables ?


Thanks in advance

T.Kindermann
Database Administrator


--
--------------------------------------------------------------------------
Thomas Kindermann
E-MAIL: Reply to TKINDER<x>@GMX.DE without <x>
Reply With Quote