Viewing 15 posts - 1 through 15 (of 18 total)
After your PUT line - "select 'put ' + @files_path + @file ", do an MDIR to a local file.
--> select 'mdir ' + @file + ' c:\temp\transfer.log'
And on the...
March 21, 2007 at 11:27 am
I had a similar problem this week. Try the following.
select distinct acct_num from h_svc where post_dt >= (select @lcDataDt)
~Steve
March 16, 2007 at 2:17 pm
Denise,
Try exec master.dbo.xp_cmdshell 'dir \\hclltest\d$\prodbackup\*.*' to see if you get any a listing of the files successfully.
~Steve
February 20, 2007 at 7:06 am
Pradeep,
I don't think that you can make a web page open using this method. My understanding is that only batch-type commands will run, not something visual or requiring user...
February 9, 2007 at 8:17 am
For me, the following works - EXECUTE master.dbo.xp_cmdShell 'cscript.exe \\asm8\c$\transf~1\transfer.vbs'
I use cscript.
~Steve
February 9, 2007 at 7:58 am
To automate further you can use the sysDatabases table found in the master database to give you the list of all your databases.
February 8, 2007 at 6:03 am
The following works for me -
EXECUTE master..xp_cmdshell '\\asm18\sys\appsdata\rentro~1\genera~1\mnprm.exe "ALL" "ALL" "9999"', no_output
The EXE above receives 3 parameters...
~Steve
December 21, 2006 at 6:32 am
Donavon,
Your first step should be to get familiar with Microsoft Query. In Excel, go to data, get external data, and then new database query. Microsoft Query will start to open. ...
April 5, 2006 at 6:06 am
In Microsoft Query, don't hard-code a criteria value but rather define the value as a "hint" surrounded with brackets - [age], for example, can be to get data back for a certain...
April 4, 2006 at 1:45 pm
Eric,
Whenever I have used sp_OAMethod I have only used 2 parameters - see below where I save and close an Excel spreadsheet...
Steve
******************************
--save and close Excel workbook
EXECUTE @hr = sp_OAMethod...
March 15, 2006 at 9:03 am
Jacob,
Try the following - just change machine name, folder and file name.
SELECT *
FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0',
'Data Source="\\<<machine name>>\C$\temp\accounting.xls";User ID=Admin;Password=;Extended properties=Excel 8.0')...Sheet1$ AS s1
--Steve
March 8, 2006 at 2:00 pm
Scott,
How about the following? Just change your server in the OPENROWSET...
--these are running jobs
SELECT *
FROM OPENROWSET('sqloledb',
'server=ASM12;trusted_connection=yes',
'set fmtonly off exec msdb.dbo.sp_help_job') WHERE current_execution_status <> 4
Steve
March 8, 2006 at 1:52 pm
I have a small script that I turn ON before I start a certain job that does INSERTS into a table. The script does an INSERT every minute with the SELECT...
October 21, 2005 at 6:33 am
Looking at the required result
number name result start_date
89277 xxxx no 8/11/05 5:12 AM
89287 xxxx no 8/11/05 5:22 AM
86405 xxxx yes 8/9/05 5:01 AM
90000 xxxx no 9/9/04 5:15 AM
Should the last...
June 16, 2005 at 1:18 pm
I use xp_sendmail - here's an example that's TAB-delimited.
DECLARE @tab VARCHAR(10)
SET @tab = CHAR(9)
EXECUTE master.dbo.xp_sendmail
@recipients = 'me'
@subject = 'here is your data',
@width = 1024,
@attach_results = 'TRUE',
@attachments =...
June 8, 2005 at 7:45 am
Viewing 15 posts - 1 through 15 (of 18 total)