Forum Replies Created

Viewing 15 posts - 16 through 30 (of 56 total)

  • RE: Can I keep x number of iterations in XP_CMDSHELL

    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

  • RE: CmdExec Job Step just hangs

    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

  • RE: Major Challenge - Too Hard to Summarize

    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

  • RE: SSIS Data flow to AS400/DB2 looses records

    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

  • RE: SSIS Data flow failing

    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

  • RE: CmdExec Job Step just hangs

    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

  • RE: Can I keep x number of iterations in XP_CMDSHELL

    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

  • RE: INDEXING

    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

  • RE: ? on running a sp in dbmail

    Error online shows incorrect profile name. Check to make sure your profile name is correct:

    http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/265151f8-1ea5-43fb-bb8d-1092bc104a67/

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: ? on running a sp in dbmail

    jbalbo (5/6/2013)


    Thanks for getting back ,

    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

  • RE: ? on running a sp in dbmail

    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

  • RE: How to do this type of insert?

    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

  • RE: email and sms

    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

  • RE: ?? on Job Steps and how they work

    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

  • RE: is it possible to union all two CTEs?

    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

Viewing 15 posts - 16 through 30 (of 56 total)