SELECT MIN(News.Numero) AS Numero FROM News WHERE Priority INTO CURSOR Temp SELECT News.Numero,News.CustomerName FROM Temp; INNER JOIN News ON Temp.Numero=News.Numero INTO CURSOR TempBasically, how can I achieve the same from a SQL Server table by the use of SQLExec()?