716

(TSQL) Is this sequence enough secure?

DECLARE@xmlXMLSET @xml = '666folder100.0020.6080.0020.0001/17/2008 12:00:00' DECLARE @Temp TABLE(server_id INT,folder_name VARCHAR(400),limit DECIMAL(30,3),used DECIMAL(30,3),free DECIMAL(30,3),usedpercent DECIMAL(10,2),data_age DATETIME) INSERT INTO @Temp(server_id, folder_name, limit, used, free, usedpercent, data_age)SELECTParamValues.ID.value('server_id[1]','INT') AS server_id,ParamValues.ID.value('folder_name[1]','VARCHAR(400)') AS folder_name,ParamValues.ID.value('limit[1]','DECIMAL(30,3)') AS limit,ParamValues.ID.value('used[1]','DECIMAL(30,3)') AS used,ParamValues.ID.value('free[1]','DECIMAL(30,3)') AS free,ParamValues.ID.value('usedpercent[1]','DECIMAL(10,2)') AS usedpercent,ParamValues.ID.value('data_age[1]','DATETIME') AS data_ageFROM @xml.nodes('//quotas/quota') as ParamValues(ID) -- The INSERT that worksINSERT INTO Quotas_LW(server_id, folder_name, limit, used, free, usedpercent, data_age, obsolete)SELECT t.server_id, t.folder_name, t.limit, t.used, t.free, t.usedpercent, t.data_age, 0FROM@Temp t LEFT JOIN(SELECT server_id, folder_name, quota_id FROM Quotas_LW) AS dt1ON dt1.server_id=t.server_id AND dt1.folder_name=t.folder_nameWHERE dt1.quota_id IS NULL
0