My expected result is quit difficult to explain so here i have shown sample data.
SourceTable: (I have alphabets in HeadNo column)
HeadNo | Start | End
---------+-----------+----------
AA | AA0000 | AA9999
AB | AB0000 | AB9999
AC | AC0000 | AC9999
AD | AD0000 | AD9999
--------------------
--------------------
------- so on ------
ZZ | ZZ0000 | ZZ9999
From this source table, I want to create kind of loop result, where each HeadNo will give return 10000 result for each, starts from 0000 to 9999.
Result should look like:
HeadNo | Actual Code
---------+---------------
AA | AA0000
AA | AB0001
AA | AC0002
AA | AD0003
--------------------
--------------------
------- so on ------
AA | AA9998
AA | AA9999
like wise for each HeadNo
ZZ | ZZ0000
ZZ | ZZ0001
ZZ | ZZ0002
ZZ | ZZ0003
--------------------
--------------------
------- so on ------
ZZ | ZZ9999
I want to merge and insert into one separate single table.
Actual Codealways be in the formatAA0000?