2 Replies Latest reply on Jun 7, 2017 4:52 PM by Bora Beran

    Flight Path Unions

    Jason Lemus

      I am working on a lab exercise for students that includes flight delay data. I located a SQL script to create the union/path using this data, however, I am not sure which variables fit within the script. The SQL statement I found online is as follows:


      SELECT [DataTableName$].[Start] AS [Location],

      [DataTableName $].[Start] + '-' + [Data$].[End] AS [PathID],

      1 AS [PathOrder]

      FROM [DataTableName$]


      SELECT [DataTableName $].[ End] AS [Location],
      [Data$].[Quantity] AS [Quantity],
      [DataTableName $].[ Start] + '-' + [Data$].[End] AS [PathID],
      2 AS [PathOrder]
      FROM [DataTableName $]


      Here is a screenshot of my data:

      Screenshot (310).png


      What should the SQL statement be for the union?