DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
SITE SEARCH SQLUSA.com HEADLINES NEWS
SQL E/BOOKS   SQL 2014 PROGRAMMING   DOWNLOADS
SCRIPTS SQL 2005 SQL 2008 ARTICLES
SQL JOBS TWITTER FORMAT VIDEOS
How to get file information?

Detailed file information can be obtained by the xp_cmdshell external stored procedure. Results can be inserted into a table with INSERT-EXEC statement.

DECLARE @CMD varchar(256)

SET @CMD = 'DIR F:\data\money.csv'

EXEC master..xp_cmdshell @CMD

/*

output

 Volume in drive F is Secondary

 Volume Serial Number is E06B-AEAD

NULL

 Directory of F:\data

NULL

01/30/2010  03:46 PM           114,030 money.csv

               1 File(s)        114,030 bytes

               0 Dir(s)  54,774,407,168 bytes free

NULL

*/

 

Exam Prep 70-461
Exam 70-461
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE