Files
GMW/GMW_DB/bin/Debug/GMW_DB.sql
T
2014-02-20 18:20:53 +01:00

100 lines
2.2 KiB
Transact-SQL

/*
Deployment script for GMW_DB
This code was generated by a tool.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
GO
:setvar DatabaseName "GMW_DB"
:setvar DefaultFilePrefix "GMW_DB"
:setvar DefaultDataPath "C:\Users\samuele\AppData\Local\Microsoft\VisualStudio\SSDT\GMW\"
:setvar DefaultLogPath "C:\Users\samuele\AppData\Local\Microsoft\VisualStudio\SSDT\GMW\"
GO
:on error exit
GO
/*
Detect SQLCMD mode and disable script execution if SQLCMD mode is not supported.
To re-enable the script after enabling SQLCMD mode, execute the following:
SET NOEXEC OFF;
*/
:setvar __IsSqlCmdEnabled "True"
GO
IF N'$(__IsSqlCmdEnabled)' NOT LIKE N'True'
BEGIN
PRINT N'SQLCMD mode must be enabled to successfully execute this script.';
SET NOEXEC ON;
END
GO
USE [$(DatabaseName)];
GO
PRINT N'Creating [voc].[stp_insNewLemma]...';
GO
/*************************************
* STORED PROCEDURE stp_insNewLemma
*
* elimina record anagrafica classe prodotto
*
* mod : 14/05/2012
* aut : S.E. Locatelli
**************************************/
create PROCEDURE voc.stp_insNewLemma
(
@lemma NVARCHAR(50),
@traduzione NVARCHAR(500)
)
AS
-- elimino se c'era già...
DELETE
FROM voc.Vocabolario
WHERE lemma = @lemma
-- inserisco x tutte le lingue attive...
INSERT INTO voc.Vocabolario
SELECT lingua, @lemma, @traduzione
FROM Lingue
SELECT *
FROM voc.Vocabolario
WHERE lemma = @lemma
RETURN
GO
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
Use SQLCMD syntax to reference a variable in the post-deployment script.
Example: :setvar TableName MyTable
SELECT * FROM [$(TableName)]
--------------------------------------------------------------------------------------
*/
--:r .\voc.Lingue.data.sql
--:r .\voc.Vocabolario.data.sql
GO
GO
PRINT N'Update complete.';
GO