Posts

Showing posts from November, 2017

SSIS Issues : A Day of Learning

Seldom are the days when you run into complex issues but resolve them in the shortest interval of time. Thanks to Larry Page and my fellow developers :-). But jokes apart I learned something new today and that always feel wonderful. Issue #1:-  Unable to enlist in the distributed transaction Symptom:- Running a package (having sequence container and TransactionOption property set to  required) on your local machine Solution  #1: Activate all the options for MSDTC (Distributed Transaction Cordinator) #2: Set the TransactionOption property to Supported Issue #2:-  The OLE DB Source.Outputs[OLE DB Source Output].Columns[XXXXXXXX] on the non-error output has no corresponding output Symptom:- You will get the error message on OLEDB Source particularly when you add extra columns after the initial design/development of the package. Solution Remove the OLEDB Source and drag n drop a new one. "Life is 10 % what happens and 90 % of how you react to it." Than

SQL Query Experiment - "WHERE" & "ON"

Image
Sometimes the mistakes you make in the coding lead you to a better understanding of a particular concept. This happened recently with me. I accidentally replaced the 'WHERE' clause in a SQL query with "AND" and the results confused the heck out of me.  Lets look at the coding part now. Suppose we have two tables #t1 and #t2.  #t1 consists of id and name #t2 consist of id and department Now the requirement is to fetch name and department of id = 2.  CREATE TABLE #T1 (ID INT, NAM VARCHAR(100)) INSERT INTO #T1 VALUES (1, 'AMIT') INSERT INTO #T1 VALUES (2, 'AMITT') INSERT INTO #T1 VALUES (3, 'AMITTT') CREATE TABLE #T2 (ID INT, DEP VARCHAR(100)) INSERT INTO #T2 VALUES (1, 'HR') INSERT INTO #T2 VALUES (2, 'FINANCE') SELECT * FROM #T1  LEFT JOIN #T2 ON #T1.ID = #T2.ID  where #T1.ID = 2  This is quite simple  But what if the select query becomes  SELECT * FROM #T1  LE