7 Replies Latest reply: Jul 4, 2015 2:37 PM by Андрей Шепель RSS

    SQL UNION query

    Андрей Шепель

      Good day!

      In sql data base i have view (Delivery_points_LastActualTeams) with such values

             

       

             

      Point_idType1Type1NameType2Type2NameType3Type3Name
      231Name1001Name3
      45001Name21Name3
      3200001Name3
      561Name11Name200

       

       

      Some of Point_id have more than one field (Type1 or Type2 or Type3) with value 1.

       

      I need write sql query which will get me such table:

         

      Point_idType(New Field)Name(New Field)
      23Type1Name1
      23Type3Name3
      45Type2Name2
      45Type3Name3
      32Type3Name3
      56Type1Name1
      56Type2Name2