This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE | |
dbo.MonthlyAllocationNonTransmitted | |
( | |
MonthlyAllocationId int NOT NULL, | |
[IsTransmitted] [bit] NOT NULL | |
CONSTRAINT [DF_MonthlyAllocationNonTransmitted_IsTransmitted] DEFAULT (CAST(0 AS bit)), | |
CONSTRAINT CK_MonthlyAllocationNonTransmitted_IsTrasmitted CHECK(IsTransmitted = CAST(0 AS bit)), | |
CONSTRAINT [PK__AccountingMonthlyAllocationNonTransmittedId1] PRIMARY KEY CLUSTERED | |
( | |
[MonthlyAllocationId] ASC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
USE [tempdb] | |
GO | |
CREATE TABLE [dbo].[ErrorCodes] | |
( | |
[ErrorCodeId] [uniqueidentifier] NOT NULL | |
, [ErrorCode] [nvarchar](3) NOT NULL | |
, [ErrorText] [nvarchar](50) NOT NULL | |
, [CreateDate] [datetime] NOT NULL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> | |
<Connections> | |
<OleDbConnection Name="CM_OLE" ConnectionString="Data Source=localhost\dev2014;Initial Catalog=tempdb;Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;" /> | |
</Connections> | |
<Packages> | |
<Package ConstraintMode="Linear" Name="v_4495"> | |
<Variables> | |
<Variable DataType="Int32" Name="ExecSQLResult">0</Variable> | |
<Variable DataType="Int32" Name="NumOfJobsToRun">-1</Variable> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> | |
<Connections> | |
<FlatFileConnection FilePath="C:\ssisdata\at.txt" FileFormat="FFFAT" Name="CM_FF"></FlatFileConnection> | |
</Connections> | |
<FileFormats> | |
<FlatFileFormat Name="FFFAT" IsUnicode="false" ColumnNamesInFirstDataRow="true"> | |
<Columns> | |
<Column Name="MyField" DataType="AnsiString" Length="15" Delimiter="CRLF"/> | |
</Columns> | |
</FlatFileFormat> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> | |
<Packages> | |
<Package ConstraintMode="Linear" Name="ArchivePackagePattern"> | |
<Variables> | |
<Variable DataType="String" Name="CurrentFileName">C:\ssisdata\SourceFile.txt</Variable> | |
<Variable DataType="String" Name="DateString" EvaluateAsExpression="true">(DT_WSTR, 4) YEAR(@[System::StartTime]) + "-" + RIGHT("0" + (DT_WSTR, 2) MONTH(@[System::StartTime]), 2) + "-" + RIGHT("0" + (DT_WSTR, 2) DAY(@[System::StartTime]), 2)</Variable> | |
<Variable DataType="String" Name="CurrentFileNameExtension" EvaluateAsExpression="true">RIGHT(@[User::CurrentFileName], FINDSTRING(REVERSE(@[User::CurrentFileName]), ".", 1 ))</Variable> | |
<Variable DataType="String" Name="ArchiveFileName" EvaluateAsExpression="true">REPLACE( @[User::CurrentFileName], @[User::CurrentFileNameExtension], "." + @[User::DateString] + @[User::CurrentFileNameExtension])</Variable> | |
</Variables> | |
</Package> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> | |
<Connections> | |
<OleDbConnection Name="Source" ConnectionString="Data Source=localhost\dev2014;Initial Catalog=tempdb;Provider=SQLNCLI10.1;Integrated Security=SSPI;" /> | |
<OleDbConnection Name="Target" ConnectionString="Data Source=localhost\dev2014;Initial Catalog=tempdb;Provider=SQLNCLI10.1;Integrated Security=SSPI;" /> | |
<OleDbConnection Name="Reference" ConnectionString="Data Source=localhost\dev2014;Initial Catalog=tempdb;Provider=SQLNCLI10.1;Integrated Security=SSPI;" /> | |
</Connections> | |
<Packages> | |
<Package ConstraintMode="Linear" Name="GetData"> | |
<Annotations> | |
<Annotation AnnotationType="Description">This package will pull only new data based on external observer table</Annotation> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> | |
<Connections> | |
<OleDbConnection ConnectionString="Provider=SQLNCLI10.1;Data Source=localhost\dev2014;Integrated Security=SSPI;Initial Catalog=tempdb" Name="CM_OLE_DB"></OleDbConnection> | |
</Connections> | |
<Packages> | |
<Package Name="POC" ConstraintMode="Linear"> | |
<Tasks> | |
<Dataflow Name="DFT POC"> | |
<Transformations> | |
<OleDbSource Name="OLE_SRC Get all columns" ConnectionName="CM_OLE_DB"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE test_cursor CURSOR | |
READ_ONLY | |
FOR SELECT TOP 10 | |
SV.name | |
FROM | |
master.dbo.spt_values AS SV; | |
DECLARE @name nvarchar(35) | |
OPEN test_cursor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- backfilled TreatySK values | |
CREATE TABLE #T | |
( | |
ClaimSK int NOT NULL | |
, TreatySK int NULL | |
, Scenario varchar(50) | |
); | |
INSERT INTO #T |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
string connectionString = @"Data Source=localhost\dev2014;Initial Catalog=tempdb;Provider=SQLOLEDB;Integrated Security=SSPI;Auto Translate=false;"; | |
string queryTableMake = @"CREATE TABLE dbo.POC(i int IDENTITY(1,10) NOT NULL, txt varchar(30) NULL);"; | |
string queryTranCheck = "SELECT @@trancount AS tc;"; | |
string query = "INSERT INTO dbo.POC(txt) SELECT 'x'; SELECT SCOPE_IDENTITY() AS x;"; | |
using (OleDbConnection conn = new OleDbConnection(connectionString)) | |
{ | |
conn.Open(); |