Monday, June 10, 2013

SQL: Get list of tables SQL DBs

MySQL
SHOW [FULL] TABLES [FROM db_name] [LIKE 'pattern']

Oracle
SELECT * FROM dba_tables

Postgres
SELECT * FROM pg_tables

MSSQL
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'

DB2SELECT * FROM SYSCAT.TABLES


Reference:
http://forums.whirlpool.net.au/archive/523219

SharePoint: Attempting to Connect to SharePoint Via Remote SQL Studio Management

I am trying to get data from a remote SharePoint. By remote, I mean that I do have the security to write an application on the SharePoint server. I have been researching a billion ways to connect and I am having trouble finding one that works.

Anyways, I found this to be the closest so far but requires SQL security that I cannot bypass. This may be useful in the future if I work on a project that gives me that access:
SELECT * FROM OPENROWSET
('Microsoft.ACE.OLEDB.12.0', 'WSS;IMEX=1; DATABASE=http://sharepointserver/optionalsite/;LIST=On Call;VIEW=;RetrieveIds=Yes;', 'SELECT * FROM LIST')

Wednesday, June 5, 2013

C#: Dragging objects to notepad

Notepad does not allow drops so there is no way for this to work.