E
efandango
How can I make this query transpose the Run_From and Run_To field titles.
SELECT DISTINCT B.Run_No, A.Run_From, A.Run_From_Postcode, B.Run_To,
B.Run_To_Postcode
FROM tbl_Runs AS B INNER JOIN tbl_Runs AS A ON A.Run_No=B.Run_No+1;
I have tried to put in an 'AS' clause. eg:
SELECT DISTINCT B.Run_No, A.Run_From AS Run_To, A.Run_From_Postcode,
B.Run_To AS Run_From,...
but it doesn't work, the query works the way I want, except I just want the
field/column headings to change names, not data. So that:
Run No Run_From Run_From_Postocde Run To Run to Postocode
becomes:
Run No Run_To Run_To_Postocde Run From Run From Postocode
SELECT DISTINCT B.Run_No, A.Run_From, A.Run_From_Postcode, B.Run_To,
B.Run_To_Postcode
FROM tbl_Runs AS B INNER JOIN tbl_Runs AS A ON A.Run_No=B.Run_No+1;
I have tried to put in an 'AS' clause. eg:
SELECT DISTINCT B.Run_No, A.Run_From AS Run_To, A.Run_From_Postcode,
B.Run_To AS Run_From,...
but it doesn't work, the query works the way I want, except I just want the
field/column headings to change names, not data. So that:
Run No Run_From Run_From_Postocde Run To Run to Postocode
becomes:
Run No Run_To Run_To_Postocde Run From Run From Postocode