Script(s)

technology as-is

August 12, 2013
by gchandra
0 comments

SQLServer Delete Duplicate Rows

Deleting duplicate rows in SQLServer is very simple. Example : Check this table let me call it as Sample, order number 1,2 & 3 ┬áhave identical values. Now we need to delete the duplicate rows.   Step 1 : Insert … Continue reading

March 12, 2013
by gchandra
0 comments

Save and Schedule SSIS Packages using SQL Server 2008 R2 for Nonadmins

How to Save and Schedule SSIS Packages using SQL Server 2008 R2 for Non Administrators Step 1 Upgrade SQLServer 2008 R2 with latest SP Step 2 Saving Package from Business Intelligence (.dtsx) to SQL Server EXEC sp_addrolemember 'db_ssisltduser', '<<user/group>>' EXEC … Continue reading

February 3, 2011
by gchandra
0 comments

What I like the most

There are many Free and Better alternatives for list mentioned below. I like them because they make my life simple. Microsoft 1. Windows 2. Office (Word, Excel, Outlook, Power point, Access) 3. Visual Studio 4. Notepad 5. Microsoft Shared View … Continue reading

October 7, 2010
by gchandra
0 comments

SSIS import mixed datatypes from Excel to SQLServer

While importing data from Excel to SQLServer, if a Excel column in has both Text and Numeric values then either Text or Numeric values will be NULL in SQLServer. See example.. If first data cell (in Excel) in that particular … Continue reading

May 6, 2010
by gchandra
0 comments

Avoid Using SQL Server Cursors

  Based on http://www.sqlbook.com/SQL/Avoiding-using-SQL-Cursors-20.aspx with a minor change. DECLARE @CustomerID int DECLARE @FirstName varchar(30), @LastName varchar(30) — declare cursor called ActiveCustomers DECLARE ActiveCustomers Cursor FOR  SELECT CustomerID, FirstName, LastName   FROM Customer  WHERE Active = 1 — Open the cursor OPEN … Continue reading

May 6, 2010
by gchandra
0 comments

Rearrange SSIS Packages in SSIS Project.

If you create multiple packages in a Project, SQLServer Business Intelligence will not sort them based on file name.  There is an alternate way to sort the items in the way you need. Open .dtproj file in Notepad / Notepad … Continue reading