2nd half of a table's fields set from the next primary key

E

efandango

I have a table of multiple address fields and want to split the result into
two sets in the same query, with half of them appearing from the first
instance of a primary key, and the second set to be based on the next primary
key value.

The primary key field is: Run_point_List_ID

This is is my table SQL:

So for example, it would read like this

SELECT tbl_Points.Run_point_List_ID, tbl_Points.Run_No,
PK = 1 tbl_Points.Run_point_Venue_X1, tbl_Points.Run_point_Address_X1,
PK = 1 tbl_Points.Run_point_Venue_A, tbl_Points.Run_point_Address_A,
PK = 1 tbl_Points.Run_point_Venue_B, tbl_Points.Run_point_Address_B,
PK = 1 tbl_Points.Run_point_Venue_C, tbl_Points.Run_point_Address_C,
PK = 1 tbl_Points.Run_point_Venue_D, tbl_Points.Run_point_Address_D,
PK = 1 tbl_Points.Run_point_Venue_E, tbl_Points.Run_point_Address_E,
PK = 1 tbl_Points.Run_point_Venue_F, tbl_Points.Run_point_Address_F,
PK = 1 tbl_Points.Run_point_Venue_G, tbl_Points.Run_point_Address_G,
PK = 1 tbl_Points.Run_point_Venue_H, tbl_Points.Run_point_Address_H,
PK = 1 +1 tbl_Points.Run_point_Venue_I, tbl_Points.Run_point_Address_J,
PK = 1 +1 tbl_Points.Run_point_Venue_K, tbl_Points.Run_point_Address_K,
PK = 1 +1 tbl_Points.Run_point_Venue_L, tbl_Points.Run_point_Address_L,
PK = 1 +1 tbl_Points.Run_point_Venue_M, tbl_Points.Run_point_Address_M,
PK = 1 +1 tbl_Points.Run_point_Venue_N, tbl_Points.Run_point_Address_N,
PK = 1 +1 tbl_Points.Run_point_Venue_O, tbl_Points.Run_point_Address_O,
PK = 1 +1 tbl_Points.Run_point_Venue_P, tbl_Points.Run_point_Address_P,
PK = 1 +1 tbl_Points.Run_point_Venue_X2, tbl_Points.Run_point_Address_X2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top