Execute queries SQL database responces

In my project I make many SQL queries to the database, hoping that they are executed correctly and I check their results with another query, e.g.

  1. Insert into …
  2. select Count (*) …
    How is it possible in UiPatch to receive messages from a database such as … “inserted 2 recods” etc?
1 Like

welcome back to uipath community
in INSERT activity we got an output variable with which we can get the affected number of records

Cheers @Slawek_Antoniewicz

Hi i cant si these activity:

Sorry … i can se )

1 Like

yah INSERT is the activity

OK… and what about UPDATE and delete…?

1 Like

we can use EXECUTE NON QUERY ACTIVITY there we have the same output propertyfor update and delete statement

Cheers @Slawek_Antoniewicz


1 Like

Cheeers @Slawek_Antoniewicz

one question yet : is passible send queries lie it vi insert acivities ?

INSERT INTO Eksport ( [Id Klienta], NIP, [Id umowy], [Numer umowy], Status, [Data zmiany statusu], [Data umowy], [Data wpływu], [Wolumen (MWh)], [Marża (zł/MWh)], [Opłata handlowa (zł/mc)], [Cene (zł/MWh)], [DataObowiązywania od], [DataObowiązywania do], [Partner sprzedażowy],[Handlowiec],[E-mail],[Telefon] ) SELECT et.[Id Klienta], et.NIP, et.[Id umowy], et.[Numer umowy], et.Status, et.[Data zmiany statusu], et.[Data umowy], et.[Data wpływu], et.[Wolumen (MWh)], et.[Marża (zł/MWh)], et.[Opłata handlowa (zł/mc)], et.[Cene (zł/MWh)], et.[DataObowiązywania od], et.[DataObowiązywania do], et.[Partner sprzedażowy],et.[Handlowiec],et.[E-mail],et.[Telefon] FROM ( Eksport_tmp as et left join Eksport on et.[Numer umowy] =Eksport.[Numer umowy]) where Eksport.[Numer umowy] is null;

sorry i didnt get this
come again pls

Hi @Slawek_Antoniewicz

It is a nested query

we can only use insert cmd within the insert activty

you can do it based on stored procedure and then you can use execute non query cmd

Ashwin S

big thx