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.
- Insert into …
- select Count (*) …
How is it possible in UiPatch to receive messages from a database such as … “inserted 2 recods” etc?
1 Like
Hi
welcome back to uipath community
in INSERT activity we got an output variable with which we can get the affected number of records
![image](https://global.discourse-cdn.com/uipath/original/3X/c/6/c6f79c89cf574a2345cbe85355f3cd95399d06f1.png)
Cheers @Slawek_Antoniewicz
Hi i cant si these activity:
![image](https://global.discourse-cdn.com/uipath/original/3X/7/2/72768662e02082f8bf3c8aa45129695cac9fa724.png)
yah INSERT is the activity
@Slawek_Antoniewicz
OK… and what about UPDATE and delete…?
1 Like
Fine
we can use EXECUTE NON QUERY ACTIVITY there we have the same output propertyfor update and delete statement
Cheers @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
@Slawek_Antoniewicz
AshwinS2
(Ashwin S)
12
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
Thanks
Ashwin S