9 Replies Latest reply: Dec 6, 2016 3:58 AM by Vineeth Pujari RSS

    Script Help

    Mark Ritter

      I am trying to create a new table that contains the average length of stay by state based on joining the data from the 2 qvd files.

       

      I am doing something wrong and can't figure it out.

       

      SNF_Info:

      LOAD MEDPAR_PROVIDER_NUMBER,

          "Provider State"

      FROM [lib://QVD Files/MedPar\Medpar_Nursing_Homes.QVD](qvd);

       

       

       

       

      Join(SNF_Info)

      LOAD

          "LENGTH_OF_STAY",

          ServiceLineDescription,

          ServiceLineNum,

          "MEDPAR_PROVIDER_NUMBER"

             

      FROM [lib://QVD Files/MedPar\Medpar_SNF_Data_2014.QVD](qvd);

       

       

      BaseLine:

      Load

        "Provider State",ServiceLineDescription,

        AVG([LENGTH_OF_STAY]) as ALOS

        Resident SNF_Info Group By "Provider State";

       

      Drop Table SNF_Info;