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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 524 views
  • 0 likes
  • 4 in conversation