I think I am trying the impossible here but due to my limited knowledge of SQL i need some help to see if there is some thing that i can do.
My issue is that i am working with really bad data and i need to be able to Link and split data and then join.
For example the 2 tables that I am working with
TABLE 1
---------
From To Street Name
5 10 ADAMS WAY
TABLE 2
-----------
Number
1
2
3
4
5
6
7
8
9
10
The output I want is
from To StreetName Number
5 10 ADAMS WAY 5
5 10 ADAMS WAY 6
5 10 ADAMS WAY 7
5 10 ADAMS WAY 8
5 10 ADAMS WAY 9
5 10 ADAMS WAY 10
So far i have been able to put this together however
SELECT *,
CASE
When T1.From = T2.NO
THEN ???? 'What do i do here'
END as Table 'What do i do next to get the rows to show'
From
T1
FULL JOIN
Numbers
ON
T1.AFrom = T2.NO
I know this is probably a long shot but any help would be appreciated.
Thanks
Maybe:
SQL-Fiddle