Files
GMW/GMW_DB/dbo/Stored Procedures/stp_ComAs_lastComandoByStored.sql
T
Samuele Locatelli a6d7ea0b2f Import iniziale DB, GMW
versione TK 2.4
inclusione schema voc x tabella lingue e vocabolario
2014-02-20 09:54:57 +01:00

22 lines
506 B
SQL

/***************************************
* STORED stp_ComAs_lastComandoByStored
*
* Ottiene il record dell'ultimo comando inviato ad AS400 dato il nome della stored con Test = 0
*
* Steamware, S.E.L.
* mod: 2011.03.30
*
****************************************/
create PROCEDURE dbo.stp_ComAs_lastComandoByStored
(
@Stored NVARCHAR(100)
)
AS
-- restituisce le righe richieste
SELECT TOP 1 *
FROM RawData.AS400_Comandi
WHERE (Stored = @Stored) AND Test = 0
ORDER BY DataEsecuzione DESC
RETURN