BookmarkSubscribeRSS Feed
BrahmanandaRao
Lapis Lazuli | Level 10
How insert new row at 3rd row place already existing table
3 REPLIES 3
PaigeMiller
Diamond | Level 26

What should the new row contain?

 

By the way, your title and text don't match, could you please go back to your original post and change the title to "Insert Row"? Thanks.

--
Paige Miller
ballardw
Super User

It would probably help to provide an example of the BEFORE and AFTER insertion table. Since you specifically say "row 3" then your before should include at least 4 rows of data and the result should show what is expected after the insertion. If your data as lots of variables we don't need to see all of them but enough to tell what was "inserted".

 

It may also help if you tell us if your existing data is sorted in any way, by what variables, and if you have a variable or combinations of variables that uniquely identify each row.

Reeza
Super User
Use the FIRSTOBS + OBS options with the SET statement.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 827 views
  • 0 likes
  • 4 in conversation