tmthyjames/SQLCell

make hooks independent of server.

tmthyjames opened this issue · 0 comments

for instance

%%sql --hook

tables MSS = USE {0};
SELECT * FROM sys.Tables;

columns_mss MSS = EXEC sp_columns {0};

columns_db1 DB1 = EXEC sp_columns {0};

views mssql+pymssql://username:password@hostname/DB = USE {0};
SELECT * FROM sys.Views;

tables_db1 DB1 = USE {0};
SELECT * FROM sys.Tables;

views_l mssql+pymssql://:@localhost/DB = USE {0};
SELECT * FROM sys.Views;

databases LC = SELECT name FROM master.sys.databases;

add server alias as argument so the same shortcut can be used across any server (assuming same sql dialect).