Working with files in SQL/SSIS can be way different experience than expectation. Here is quick way to get file createdate (not the last modified date) from command prompt using powershell script. PS: This is not possible in original Linux system as createdate (or birthtime) not stored as per POSIX standard. But current ext4 or BTRFS does […]
SQL comic
Some comic strips for fun Starting with the epic on xkcd The obivious pun SQL or NoSQL Predictive analysis, Is it real A child’s curiosity To be or not to be (SQL expert) Everyday job Do you think similar This is what office boss looks like
TSQL command line execution (sqlcmd)
The Microsoft SQL Server offers pretty good command line capability which can be used in variety of cases. Recently when I was consulting a client, there was a requirement to move data between two servers. Obvious way was to use any ETL tool but they were not ready for it. Also client was not ready […]
Reverse a string w/o built-in TSQL function
This time it will be fairly simple task of reversing a string in SQL without using REVERSE() function Why we do it??? Because we can 🙂 First approach is traditional way like below declare @str varchar(50) =’live’; select @str String declare @cnt int; declare @revstr varchar(50); set @cnt = len(ltrim(rtrim(@str))); while (@cnt>0) begin set @revstr=concat(@revstr,substring(@str,@cnt,1)) set @cnt=@cnt-1; end […]
Columnstore index – SQL Performance
Pain: Performance tuning SQL DBA’s email to SQL Developer “Your query is too slow and eating up server resources. Please tune it” Dream: Senior SQL DBA’s email to SQL Developer “Your query is too fast. Slow it down :P” Fix: Well there are thousands or should I say tens of thousands of ways to do performance tuning […]
Fuzzy logic in TSQL
Pain: Fuzzy logic in TSQL For those who have worked as SQL developer must have gone through the tough period of working with manually entered data. A certain company works with manual data entry for most of its early life and when IT enters (drumroll), they feel so happy to dump all those excel […]