Posts

BIDS - Visual Studio - Faster Startup Load With -nosplash

Image
Just a quick note to save time over appearance and save on memory when you start BIDS or SSMS. By adding ( -NoSplash ) switch at the end. The same trick can be applied to all versions of Visual Studio and SSMS (SQL Server Management Studio) by the way.

The worst data mining example ever!!

Image
Today I was buying a suit online from Macys when I got hit by a bizarre unmatched recommendations. Although I wasn't logged in! Right away sqlserverdatamining.com came to my mind with their  Movie!Click  example.

Weeks In SQL - Start and End days of a week.

Declare @Date datetime = '03/15/2011' ------- Your Date select dateadd(day,( -datepart(weekday,dateadd(day,(7)-datepart(weekday,@Date),@Date))+((7)-datepart(weekday,@Date)))+(1),@Date) AS [First_Day_Of_The_Week] Select dateadd(day,(7)-datepart(weekday,@Date),@Date) AS [Last_Day_Of_The_Week]

BIDS slower than DTEXEC !

I Recently came accross two important that I would like to share articles regarding that topic. http://blogs.msdn.com/b/mattm/archive/2011/01/15/why-does-my-package-run-slower-in-bids-than-dtexec.aspx?wa=wsignin1.0 http://sqlblog.com/blogs/jamie_thomson/archive/2011/01/12/always-use-dtexec-exe-to-test-performance-of-your-dataflows-no-exceptions.aspx Helpful Dtexec.exe cheats: To execute an SSIS package saved to SQL Server using Windows Authentication: dtexec /sq pkgOne /ser productionServer To execute an SSIS package saved to the File System folder in the SSIS Package Store: dtexec /dts "\File System\MyPackage" To validate a package that uses Windows Authentication and is saved in SQL Server without executing the package: dtexec /sq pkgOne /ser productionServer /va To execute an SSIS package that is saved in the file system: dtexec /f "c:\pkgOne.dtsx " To execute an SSIS package that is saved in the file system, and specify logging options: dte...

Start and End Date of specific date.

Declare @Date datetime, @Start Datetime, @End Datetime SET @Date = '02/17/2011' ------- Your Date SET @Start = DATEADD(dd, 1, DATEADD(dd, -DATEPART(dd, @Date), @Date)) SET @End = DATEADD(dd, -1, DATEADD(mm, 1, @Start)) SELECT @Start AS [Start Date], @End  AS [End Date]

Date and Time dimension creation and population T-SQL

Just to point and give credit to this helpful script to create Date and Time dims in SSAS, I know that you can use the wizard in SSAS t ocreate and populate data in a date Dimension but not a time dimesion. It's by Joshua A. Walker The script is http://www.sqlservercentral.com/scripts/Data+Warehousing/65762/ ...

The end of my SSRS "NaN" misery! Avoid SSRS "NaN"....

I always had problems with that annoying “NaN” in SSRS, I used to run around it using IIF or REPLACE and ROUND, but finally I decided not to give up and find a neater solution for that particular report.  Reading more about the IIF function @ http://msdn.microsoft.com/en-us/library/27ydhh0d%28vs.71%29.aspx At the remarks section, they say “The expressions in the argument list can include function calls. As part of preparing the argument list for the call to IIf , the Visual Basic compiler calls every function in every expression. This means that you cannot rely on a particular function not being called if the other argument is selected by Expression .” Anyway to cut my story short, if you have a function like: =IIF(Lookup(Fields!ADM_DR_ID.Value, Fields!ADM_DR_ID.Value, Fields!ID2010.Value, "LOS") = nothing, "0" , Lookup(Fields!ADM_DR_ID.Value, Fields!ADM_DR_ID.Value, Fields!ID2010.Value, "LOS")) It’s not going to work. The right way is to avoid dividi...