Forum Replies Created

Viewing 15 posts - 196 through 210 (of 429 total)

  • RE: substring/charindex

    Nice one Sean.

    I always forget about PARSENAME as I never seem to consistently have 3 or less delimiters.

  • RE: Help with SQL VB Script- forcing DTSERSuccess

    The very last line in your subroutine sets the result to success regardless of what happened above.

    "Dts.TaskResult = ScriptResults.Success"

    If you move that line to the top of your subroutine, that...

  • RE: substring/charindex

    You can simplify that a bit by using reverse to find the position of the last "-" from the right, and then using the right function:

    declare @s-2 varchar (100) =...

  • RE: Nested Transactions

    L' Eomot Inversé (10/28/2013)


    Nice question.

    Has one small problem though: the code leaves a transaction open - nothing is actually committed.

    It's clearly stated in BOL:-

    Although each COMMIT TRANSACTION statement has a...

  • RE: Date Functions

    Toreador (10/24/2013)


    For me, a better answer is to subtract one from the first day of the next month, as this method will allow the same code to be run on...

  • RE: Job continue running while step failed

    I've seen a similar problem with invalid paths in SSIS just hanging instead of erroring out. We never did find a solution. Instead we ended up using a...

  • RE: Job continue running while step failed

    There are a couple of things that could be happening here. It is possible that the step being executed is in turn calling an external process, and the external...

  • RE: SQL Server 2012 Package Execution utility

    It's probably the space in your path.

    Try replacing "CPAS WorkArea" with "CPAS~1" and see if that helps.

  • RE: Calling oracle stored procedure from SSIS

    You can call an Oracle stored procedure from an Execute SQL Task by using the following syntax:

    {CALL <schema>.<procedure>}

    In your case I believe it would be

    {CALL RGN.set_context_server(p_access_mode='S',p_region_id=121)}

    Although I've never tried...

  • RE: Parameter sniffing

    Wow, what an interesting question. Thank you for posting this!

  • RE: tsql for XML format the values as elements

    Here's a horrible and almost completely useless solution, but it does work... although it doesn't return the elements in the shortened notation....

    DECLARE @XMLTest TABLE( [Name] [NVarChar](50) NOT NULL )

    DECLARE @sql...

  • RE: Who talks SQL out of work...

    I explain what I do to my wife by thinking up analogies she can relate to.

    I can tell she understands, 'cause she nods her head now while she checks her...

  • RE: Capture t-sql error occured in xp_cmdshell

    You can capture the output from a command executed with xp_CMDshell by doing something like this:

    DECLARE @CMD VarChar(500)

    DECLARE @Results TABLE

    (

    ID Int Not Null IDENTITY(1,1),

    Line VarChar(256)

    )

    SET @CMD = 'dir C:\'

    INSERT INTO...

  • RE: Not getting the email notification that I set up

    You can check the status of your queued emails in the MSDB table sysmail_sentitems. You can also look for errors in the MSDB table sysmail_event_log.

    Here's a query that combines...

  • RE: Linked Servers

    Do you have a string literal being implicitly converted to a date?

    Something like WHERE TABLE.Start_Date = '2013-10-15'?

    If so, you might want to try changing it to WHERE TABLE.Start_Date = TO_DATE('06/30/2012','MM/DD/YYYY')...

Viewing 15 posts - 196 through 210 (of 429 total)