is there a way to update mutiiple rows in SAS

Posted on 2011-10-28
Last Modified: 2013-11-16
I have a SAS dataset  DATA1 that has mbr_id repeated because of different data.  The dataset has a column "AH", that I would like to update with a value from another SAS dataset (DATA2).

The update statement only updates the first occurence.

Is there a way to update all of the records with a matching id?
Question by:morinia
    LVL 14

    Expert Comment

    by:Aloysius Low
    could you post the code you are using?  is it a data step?

    using proc sql with a typical should do the  trick

    Author Comment

    Data Day_Care;
          Update Day_care PH;
          by mbr_id;

    The problem is the file Day_Care has multiples of mbr_id.  
    LVL 14

    Accepted Solution

    like i said in my previous post, do a proc sql code instead... there are differences in behaviour between a data step and proc sql...

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now