Viewing 15 posts - 16 through 30 (of 56 total)
You need to be able to dynamically name your file and then use bcp to delete the file (using Command Prompt commands, calling DEL) from 30 days ago.
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 2:20 pm
And you still can't run it from command prompt? If not, still permissions
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 2:16 pm
Do you have any sample data for this?
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 2:12 pm
Since you are doing it over the WAN, it is possible that the records are getting lost between the SQL Server and the DB2 server? It sounds like it's...
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 2:04 pm
Try running the job manually from within the SSIS project. You should get more details then what SQL Server Agent is providing.
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 2:00 pm
Do you have windows permissions to the UNC path? If you can't run it from Command Prompt, it sounds like a Windows permissions issue.
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 1:58 pm
Are you saying you don't want to overwrite the file? You want to keep thirty days worth of files? If so, you can use cmdshell to delete files...
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 1:57 pm
From my understanding, it is better to create your clustered index on primary keys, while leaving the non-clustered indexes to everything else you might search on. If you have...
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 7, 2013 at 6:44 pm
Error online shows incorrect profile name. Check to make sure your profile name is correct:
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 6, 2013 at 4:12 pm
jbalbo (5/6/2013)
so something like this ?
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'me@email.org',
@query = 'select FName as first,
LName as last
from client where LName =...
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 6, 2013 at 3:14 pm
You will need to use the following variables from the sp_send_dbmail procedure to include a query in your email:
[ , [ @query = ] 'query' ]
...
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 6, 2013 at 2:57 pm
Without more data, it is really hard to answer this question. You would start with a really simple query like this:
Insert into Table1
select * from Table2
You can then add...
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 2, 2013 at 11:07 pm
Ed, I'm not seeing the variable where the data is actually included (@attach_query_result_as_file). Are you attaching a file with the data or is it being put right into the...
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 2, 2013 at 11:02 pm
It would happen within the step that the email execution occurs. It doesn't wait until the end of the job before it will email out the report.
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 1, 2013 at 1:56 pm
It looks like malleswarareddy_m's solution should work, but I guess it depends on what exactly are you trying to accomplish. How come you decided to use CTE's instead of...
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
April 30, 2013 at 10:03 pm
Viewing 15 posts - 16 through 30 (of 56 total)