Posts

Vlookup - approximate match = TRUE and Fuzzy lookup

Vlookup approximate match = TRUE almost never works because it's not what it sounds like. For matching a dataset with another, there is an add-in called Fuzzy lookup. http://www.microsoft.com/en-us/download/details.aspx?id=15011 It is very simple to use and allows us to set threshold to find similarity. It gives required results with 90 to 95 percent accuracy. I set my thresholds at 0.8 most of the time, anything below, it gives data that I don't want and above that, it misses some vital information. Finding the sweet spot also depends on the data being compared and acceptable level of accuracy.  

UI Notification for Windows Services

UI notification for windows services is not directly possible. Typically event log can be updated with windows service.  UI notification can be achieved with another application that consumes windows service to give notifications.

Update statement with join

 UPDATE scrcrd SET scrcrd.sku_health = skrev . sku_health FROM tbl_SLM_Scorecard scrcrd JOIN tbl_SLM_SKU_Review skrev ON scrcrd . material = skrev . material and scrcrd . month_yr = skrev . month_yr where scrcrd . month_yr = '2015-01-31' and skrev . material is not null and skrev . sku_health <> scrcrd . sku_health

Check list for SQL optimization

SQL: Scale Up vs. Scale Out Check Description Optimize the application before scaling up or scaling out. Address historical and reporting data. Scale up for most applications. Scale out when scaling up does not suffice or is cost-prohibitive. Schema Check Description Devote the appropriate resources to schema design. Separate online analytical processing (OLAP) and online transaction processing (OLTP) workloads. Normalize first, denormalize later for performance. Define all primary keys and foreign key relationships. Define all unique constraints and check constraints. Choose the most appropriate data type. Use indexed views for de...