Torna al Thread

ALTER PROCEDURE TMP_DIVIDI_TAB_CORSI @idCorso as int, @ente as nvarchar, @codEnte as nvarchar(50)='', @fse as bit = 0, @annoFse as smallint = 1900, @postiOb2 as tinyint = 0, @postiDonne as tinyint = 0, @asse as char(1) = '-', @misura as tinyint = 0, @ob as char(3) = '---', @dataSelezione as smalldatetime = '01/01/1900' AS if (exists(select * from CORSI_FINANZIATI WHERE corsi_id=@idCorso)) begin UPDATE CORSI_FINANZIATI SET corsi_id = @idCorso, codiceEnte = @codEnte, enteFinanziatore = @ente, fse = @fse, annoFse = @annoFse, postiOb2 = @postiOb2, postiDonne = @postiDonne, asse = @asse, misura = @misura, obiettivo = @ob, dataSelezione = @dataSelezione end else begin INSERT INTO CORSI_FINANZIATI (corsi_id, codiceEnte, enteFinanziatore, fse, annoFse, postiOb2, postiDonne, asse, misura, obiettivo, dataSelezione) VALUES (@idCorso, @codEnte, @ente, @fse, @annoFse, @postiOb2, @postiDonne, @asse, @misura, @ob, @dataSelezione) end
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5