Archives: 08/09/2012

BACKUP

Execute the BACKUP DATABASE statement to create the full database backup, specifying: The name of the database to back up. The backup device where the full database backup is written. declare @databaseName nvarchar(1024); declare @FileName nvarchar(1024); set @FileName = ‘C:\BIZERBA\DbBackup\ORTOFIN_’ + cast(@CD_TIPO_CONFEZIONAMENTO as varchar) + ‘_’ + convert(varchar,getdate(),112)+’.bak’; select @databaseName = ‘ORTOFIN’ ; backup database…

SEND MAIL

LINUX SERVER MAIL CLIENT SHELL create or replace procedure SP_SENDMAIL(pPROC varchar2, pTITLE varchar2, pTEXT varchar2, pATTACH varchar2, pHTML varchar2) AS v_COMMAND varchar2(8000); v_FROM varchar2(256); v_TO varchar2(256); v_CC varchar2(256); v_BCC varchar2(256); v_CALL number; v_DS_ERR varchar2(8000); begin — TODO: Questa procedura va modificata drasticamente, utilizzando il package UTL_MAIL [è più recente e nuovo rispetto a UTL_SMTP] v_COMMAND…

ROLLUP

SELECT dwh_stock.cd_deposito, or_referenze.cd_set, NVL(dwh_stock.cd_int, ‘Totale ‘ || NVL(cd_set, cd_deposito)) cd_int, CASE WHEN GROUPING(dwh_stock.cd_int) = 0 AND GROUPING(or_referenze.cd_set) = 0 THEN MAX(anag_referenze_ext.ds_referenza_interna) ELSE NULL END ds_referenza, CASE WHEN GROUPING(dwh_stock.cd_int) = 0 AND GROUPING(or_referenze.cd_set) = 0 THEN MAX(anag_referenze_ext.cd_grm) ELSE NULL END cd_grm, SUM(dwh_stock.ps_netto) ps_netto, SUM(dwh_stock.vl_costo) vl_costo FROM dwh_stock, anag_referenze_ext, or_referenze WHERE dwh_stock.cd_int = anag_referenze_ext.cd_int AND dwh_stock.cd_int =…

Go Top