ms-accessappendms-access-2016ms-queryjquery-append

access 2016 append multifield to one field


[![enter image description here][1]][1]good day to you all.

I have a table with some field like attached file T_Jadwal2.jpg. https://i.sstatic.net/mPuBg.jpg I need the the table insert to other table with the difference way format like T_Jadwal3.jpg https://i.sstatic.net/hRg7y.jpg Kindly to have the solution in query to append the T_Jadwal2 to T_Jadwal3

Thank you.

Regards, Fernando


Solution

  • Create a union query like this:

    Select ID_Jadwal, [Shift], Supervisor As Nm_Karyawan, "Supervisor" As Posisi
    From YourTable
    Where Supervisor Is Not Null
    Union All
    Select ID_Jadwal, [Shift], Printing, "Printing"
    From YourTable
    Where Printing Is Not Null
    Union All
    Select ID_Jadwal, [Shift], Tinta, "Tinta"
    From YourTable
    Where Tinta Is Not Null
    Union All
    Select ID_Jadwal, [Shift], Cylinder, "Cylinder"
    From YourTable
    Where Cylinder Is Not Null
    Union All
    Select ID_Jadwal, [Shift], Dry, "Dry"
    From YourTable
    Where Dry Is Not Null
    Union All
    Select ID_Jadwal, [Shift], Extrusion, "Extrusion"
    From YourTable
    Where Extrusion Is Not Null
    Union All
    Select ID_Jadwal, [Shift], Slitting, "Slitting"
    From YourTable
    Where Slitting Is Not Null
    Union All
    Select ID_Jadwal, [Shift], Rewind, "Rewind"
    From YourTable
    Where Rewind Is Not Null
    

    Use this as source in your append query.