E
efandango
I have a table that I want to normalize. The SQL below delivers the results
in Alpha Order. But I want them to appear in field order, just like the order
in the SQL below. Can this be done?, or have I created an untameable monster?
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_A],
[Run_Point_Address_A] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_B],
[Run_Point_Address_B] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_C],
[Run_Point_Address_C] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_D],
[Run_Point_Address_D] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_E],
[Run_Point_Address_E] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_F],
[Run_Point_Address_F] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_G],
[Run_Point_Address_G] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_H],
[Run_Point_Address_H] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_I],
[Run_Point_Address_I] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_J],
[Run_Point_Address_J] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_K],
[Run_Point_Address_K] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_L],
[Run_Point_Address_L] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_M],
[Run_Point_Address_M] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_N],
[Run_Point_Address_N] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_O],
[Run_Point_Address_O] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_P],
[Run_Point_Address_P] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_X1],
[Run_Point_Address_X1] FROM [tbl_Points] UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_X2],
[Run_Point_Address_X2] FROM [tbl_Points]
UNION SELECT Run_point_List_ID, [Run_No], [Run_Point_Venue_X1],
[Run_Point_Address_X1]
FROM [tbl_Points] ORDER BY [Run_point_List_ID];
in Alpha Order. But I want them to appear in field order, just like the order
in the SQL below. Can this be done?, or have I created an untameable monster?
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_A],
[Run_Point_Address_A] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_B],
[Run_Point_Address_B] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_C],
[Run_Point_Address_C] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_D],
[Run_Point_Address_D] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_E],
[Run_Point_Address_E] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_F],
[Run_Point_Address_F] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_G],
[Run_Point_Address_G] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_H],
[Run_Point_Address_H] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_I],
[Run_Point_Address_I] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_J],
[Run_Point_Address_J] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_K],
[Run_Point_Address_K] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_L],
[Run_Point_Address_L] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_M],
[Run_Point_Address_M] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_N],
[Run_Point_Address_N] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_O],
[Run_Point_Address_O] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_P],
[Run_Point_Address_P] FROM [tbl_Points]UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_X1],
[Run_Point_Address_X1] FROM [tbl_Points] UNION
SELECT [Run_point_List_ID], [Run_No], [Run_Point_Venue_X2],
[Run_Point_Address_X2] FROM [tbl_Points]
UNION SELECT Run_point_List_ID, [Run_No], [Run_Point_Venue_X1],
[Run_Point_Address_X1]
FROM [tbl_Points] ORDER BY [Run_point_List_ID];