> Tech > Listings (2)

Listings (2)

Tech - Par Renaud ROSSET - Publié le 24 juin 2010
email


Listing 6 : Script ActiveX pour la Type1 Refresh DDQ Task

‘ Type 1 Refresh Process
Function Main()
DTSDestination(“package”) = DTSSource(“package”)
DTSDestination(“productname”) = DTSSource(“productname”)
DTSDestination(“productid_app”) = DTSSource(“productid”)
Select Case DTSSource(“tran_type”)
Case “I”
Main = DTSTransformstat_InsertQuery
Case “D”
Main = DTSTransformstat_DeleteQuery
Case “U”
Main = DTSTransformstat_UpdateQuery
End Select
End Function


Listing

7 : Script ActiveX pour la Type2 Refresh DDQ Task

‘ Type 2 Refresh Process
Function Main()
DTSDestination(“package”) = DTSSource(“package”)
DTSDestination(“productname”) = DTSSource(“productname”)
DTSDestination(“productid_app”) = DTSSource(“productid”)
DTSDestination(“effective_date”) = DTSSource(“log_date”)
Select Case DTSSource(“tran_type”)
Case “I”
Main = DTSTransformstat_InsertQuery
Case “D”
Main = DTSTransformstat_DeleteQuery
Case “U”
If DTSSource(“packagechg”) = False Then
DTSDestination(“package”) = -1
Main = DTSTransformstat_UpdateQuery
End Select
End Function

Listing 8 : Script ActiveX pour la procédure stockée usp_Update_Products_type2

CREATE PROC usp_Update_Products_type2
@productid_app AS INT,
@productname AS VARCHAR(25),
@package AS INT,
@effective_date AS DATETIME
AS
IF @package <> -1
BEGIN
UPDATE Products_type2
SET to_date = @effective_date
WHERE productid_key = (SELECT MAX(productid_key)
FROM Products_type2
WHERE productid_app = @productid_app)
INSERT INTO Products_type2(productid_app, productname, package, effective_
date)
VALUES(@productid_app, @productname, @package, @effective_date)
END
ELSE
BEGIN
UPDATE Products_type2
SET productname = @productname
WHERE productid_app = @productid_app
END
GO

Listing 9 : Script de création pour la procédure stockée usp_Update_Products_type3

CREATE PROC usp_Update_Products_type3
@productid_app AS INT,
@productname AS VARCHAR(25),
@package AS INT,
@effective_date AS DATETIME
AS
IF @package <> -1
BEGIN
UPDATE Products_type3
SET productname = @productname,
package2 = package1,
package1 = package,
package = @package,
effective_dat2 = effective_dat1,
effective_dat1 = effective_date,
effective_date = @effective_date
WHERE productid_app = @productid_app
END
ELSE
BEGIN
UPDATE Products_type3
SET productname = @productname
WHERE productid_app = @productid_app
END
GO

Téléchargez cette ressource

État des lieux de la réponse à incident de cybersécurité

État des lieux de la réponse à incident de cybersécurité

Les experts de Palo Alto Networks, Unit 42 et Forrester Research livrent dans ce webinaire exclusif leurs éclairages et stratégies en matière de réponses aux incidents. Bénéficiez d'un panorama complet du paysage actuel de la réponse aux incidents et de sa relation avec la continuité de l'activité, des défis auxquels font face les entreprises et des tendances majeures qui modèlent ce domaine. Un état des lieux précieux pour les décideurs et professionnels IT.

Tech - Par Renaud ROSSET - Publié le 24 juin 2010