Nolio Official KB: How do I use select and update in a single action while running a SQL query in Nolio?
In order to use both an Select query and update in a Nolio SQL query Script, you need to have as your first line SET NOCOUNT ON . This will allow you to process the update and the receive the outputs from the select query. Otherwise the script may update the Database but return an empty resultset.
Example:
set nocount on;
begin tran;
Update S
Set Last = 1
From [dbo].[nolio] S
Where First in (Select Top 1 First
From dbo.nolio NL
WHERE NL.ID = 0);
select * from [dbo].[nolio]
commit;