6 Replies Latest reply: Mar 21, 2017 4:10 PM by Aar Kay RSS

    create three columns with one field

    Robert Winkel

       

      I am trying to create three new columns with just the drug name(Red), and two columns with the NDC(Green) numbers.

       

      There is a variable char# count 

       

      Is this possible to do?

       

      I have included an excel file with two different sets of data.

      Reorder number and drug name are veritable character length.   

       

       

       

      LIB CONNECT TO 'pharmoresql production (pharmore_rwinkel)';

      LOAD ID,

           FacID,

          PatID,

           Msg,

            UPPER (ChangedBy) as ChangedBy,

           ChangedOn,

           "Comment";

        QL SELECT ID,

           FacID,

           PatID,

         Msg,

         ChangedBy,

         ChangedOn,

         "Comment"

      ROM FwReports.dbo.PatientsLog

      ere ChangedOn > '2015-1-1'

        and Upper(Msg) like '% NDC FROM %';