Get table or view name by search column name keyword
Here is the script: SELECT c.object_id, CASE WHEN OBJECTPROPERTY(c.object_id, 'isTable') = 1 THEN 'Yes' ELSE 'No' END AS IsTable, CASE WHEN OBJECTPROPERTY(c.object_id, 'isView') = 1 THEN 'Yes' ELSE...
View ArticleQuick tip: start visual studio 2015 from git bash without hanging in terminal
Add one alias in your ~/.bashrc file: alias vs='nohup /c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 14.0/Common7/IDE/devenv.exe $1 < /dev/null > /dev/null 2>&1 &'
View ArticleFastest way to insert 1 million rows
Here is the fastest way to insert 1 million rows to a table in SQL Server Credit goes this post: Generate and Insert 1 million rows into simple table WITH L0 AS (SELECT c FROM (SELECT 1 UNION ALL...
View ArticleCompare two lists of objects by specific properties
Credit goes: http://stackoverflow.com/questions/19790211/comparing-two-lists-according-to-specific-properties .Net Except with IEqualityComparer // define the Animal class public class Animal { public...
View ArticleSend key-strokes Ctrl+Alt+Del through nested RDP sessions
Credit belongs to https://superuser.com/a/871037/136936 Ctrl+Alt+Del won’t work with nested RDP(remote desktop protocol) sessions Ctrl+Alt+End won’t work with nested RDP sessions The only way to make...
View ArticleThe performance summary of OUTER JOIN vs NOT IN VS NOT EXISTS
Mark this post which is extremely useful to compare performance among these SQL query WHERE methods: https://sqlperformance.com/2012/12/t-sql-queries/left-anti-semi-join Summary in short: NOT EXISTS...
View ArticleSearch keyword in certain files in certain folders
Through UI in Windows: Download grepWin: https://sourceforge.net/projects/grepwin/ Then search like this: Through git bash prompt: grep -irnl "my search keyword" --include=*.js --include=*.cs...
View ArticleConvert excel datetime text to a sort-able standard datetime string
Here are a few excel datetime strings in format like “m/d/yyyy h:mm:ss am/pm”, so the length of this string is different in different date/time: 2/3/2017 8:2:32 AM 12/23/2017 1:20:32 PM Searched a...
View ArticleAttach to IIS w3wp Process for debugging
When you need to debug .Net application, normally you need to attach to the w3wp.exe process. For example: However, sometimes you don’t want to attach all the worker process but only like to focus the...
View ArticleHow to setup a local CDN server with SSL(https) support
Generate local SSL certificate mkdir /sample/cert && cd /sample/cert openssl genrsa -des3 -out rootCA.key 2048 openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem...
View ArticleFree handy log viewer from Microsoft – Log Parser Studio
Had a request that needs to analysis IIS log, search a little bit and found out this tool: Log Parser Studio, and it’s build on top of the command tool Log Parser 2.2, it will load your formatted log...
View ArticleIIS: How to list all applications for each site command line
Use Appcmd.exe at %systemroot%\system32\inetsrv\ List all applications for all sites configured: appcmd list app List all applications’ sites(need to be in powershell) .\appcmd.exe list app...
View ArticleMy dev tool set
Windows: SQL Tools Apex SQLhttps://www.apexsql.com/sql-tools-complete.aspxhttps://www.apexsql.com/sql-tools-refactor.aspxhttps://www.apexsql.com/sql-tools-search.aspx TerminalConEmu:...
View ArticleEverything about Oracle Application Container
Multitenant : Application Containers in Oracle Database 12c Release 2 (12.2) Application Container in Oracle Database 12c R2 :- Part 1: Basic Understanding of Application container and it’s...
View ArticleDisplay tSQLt test results when run test in SQL Server Management Studio
Normally when you run tSQLt tests inside SQL Server Management Studio(SSMS), the test results will automatically shown in Message tab, however, if the store procedure include SELECT statement and have...
View ArticleWindows 10 USB-C to HDMI not working
I got a Thinkpad laptop had one HDMI out and one USB-C, bought a cheap USB-C to HDMI converter at Amazon, originally works fine for me to hook up to two external monitors. However, after some time,...
View ArticleSublime Text SQL syntax to highlight temp table
For Sublime Text 2/3 by default the SQL syntax highlight will treat temp table like #tmpTable as comment, here’s how to adjust it to accept the temp table as part of highlight: Install OverrideAudit...
View ArticleAdd Sublime Text windows context menu
Sublime Text provided portable version installation with zip file that you can just extract to any folder that current user has the access permission, however, seems there’s no easy way to add a...
View ArticleHow to install Poor Man’s TSQL Formatter to SQL Server Management Studio...
Since the official Poor Man’s TSQL Formatter is not support the latest version SSMS v19 yet, it needs a little bit tweak to make it work: Assuming that previous version (2014-2018) has been installed...
View ArticleHow to install Poor Man’s TSQL Formatter to SQL Server Management Studio...
Since the official Poor Man’s TSQL Formatter is not support the latest version SSMS v20 yet, it needs a little bit tweak to make it work: Assuming that previous version (2014-2018) has been installed...
View Article