BookmarkSubscribeRSS Feed
justusjillella
Fluorite | Level 6
How to fund no of rows inserted into a database In a single insert when updating the db
5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

Show us your code?

Kurt_Bremser
Super User

Use &sqlobs:

data have;
x1 = 'A';
x2 = 1;
stop;
run;

proc sql;
insert into have
values ('X',2)
values ('C',3)
;
quit;

%put &sqlobs;

Log excerpt:

50         %put &sqlobs;
2
justusjillella
Fluorite | Level 6
Hi, thanks for the reply
We are inserting data into a table in Google cloud using explicit method. We would like to know in one insert how many rows are inserted into the table.
Is there any option to see it in log
andreas_lds
Jade | Level 19

@justusjillella wrote:
Hi, thanks for the reply
We are inserting data into a table in Google cloud using explicit method. We would like to know in one insert how many rows are inserted into the table.
Is there any option to see it in log

Have you tried the code posted by @Kurt_Bremser ?

Kurt_Bremser
Super User

My code will most probably not work, as with explicit passthrough the whole work is done in the DBMS, and SAS SQL only sees EXECUTE() with some text inside. Personally, I have no experience with explicit PT.

It might be possible to structure the PT code in a way that it renders the number as output, and then use that as "from" in the SAS SQL code.

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
  • 5 replies
  • 1405 views
  • 0 likes
  • 4 in conversation