Forum Replies Created

Viewing 15 posts - 1 through 15 (of 85 total)

  • RE: CTE - Cursor - Try Catch

    drew.allen - Friday, November 3, 2017 12:22 PM

    rxm119528 - Friday, November 3, 2017 11:56 AM

  • RE: CTE - Cursor - Try Catch

    Phil Parkin - Friday, November 3, 2017 12:27 PM

    Alternatively, why not something like
    IF TRY_CAST(Column1 as INT) is NULL
    BEGIN
    --Write to error log
    END?
    Though you...

  • RE: CTE - Cursor - Try Catch

    Phil Parkin - Friday, November 3, 2017 11:39 AM

    This does not get caught at design time. You have to open the cursor...

  • RE: CTE - Cursor - Try Catch

    Michael L John - Friday, November 3, 2017 11:25 AM

    SELECT CAST(column1 AS INT) AS column1 is your error.

    You can't cast 'ABC' to...

  • RE: Rewrite using CTE

    Apologies for the missing loop. Thanks for the different approaches. I just wanted to learn the other ways we can append those sequence of numbers with out using the for...

  • RE: Raiserror syntax in 2008R2 Vs 2012

    Eric,

    the compatibility mode is set to SqlServer2008(100).

    Thanks

    RM.

  • RE: Execute SQL task issue

    skrs (1/13/2015)


    Stored procedure is passed to the variable . I have given it as Direct input and passed the stored procedure with the input parameters even that did not...

  • RE: Get previous years holiday date

    With out the Windows Function

    ;with CTE as

    (select rownum = ROW_NUMBER() OVER (ORDER BY HolidayName,HolidayDate desc),

    HolidayName,HolidayDate from @table)

    SELECT

    cte.HolidayDate,

    CTE.HolidayName,

    Previous.HolidayDate PreviousHolidayDate

    FROM CTE

    LEFT JOIN CTE Previous ON Previous.rownum = CTE.rownum + 1

    and Previous.HolidayName...

  • RE: Please vote for the "built in Tally Table" function.

    voted!! 177

  • RE: sys.sql_modules truncating definition

    Alexander Suprun (9/26/2014)


    rxm119528 (9/26/2014)


    Alexander Suprun (9/26/2014)


    rxm119528 (9/26/2014)


    This starts truncating after 43696 either using OBJECT_DEFINITION or sys.sql_modules.

    Nothing is truncated. Accept it. The stored procedure has 43696 characters.

    Please add one character...

  • RE: sys.sql_modules truncating definition

    Alexander Suprun (9/26/2014)


    rxm119528 (9/26/2014)


    This starts truncating after 43696 either using OBJECT_DEFINITION or sys.sql_modules.

    Nothing is truncated. Accept it. The stored procedure has 43696 characters.

    Please add one character to it.

  • RE: sys.sql_modules truncating definition

    Eirikur Eiriksson (9/26/2014)


    Quick though, use the object_definition function, that is the same as the system views use. Don't recall that I changed any settings on the system I'm using, brings...

  • RE: sys.sql_modules truncating definition

    Alexander Suprun (9/26/2014)


    rxm119528 (9/26/2014)


    These are the actual statistics of the procedure

    Words9899

    Line2406

    Characters(no Space)84040

    Characters(With Space)124451

    Are you sure?

    SELECT LEN(definition) FROM sys.sql_modules WHERE object_id = object_id('procA')

    yes SELECT LEN(definition) FROM sys.sql_modules WHERE object_id = object_id('procA')...

  • RE: sys.sql_modules truncating definition

    These are the actual statistics of the procedure

    Words9899

    Line2406

    Characters(no Space)84040

    Characters(With Space)124451

  • RE: sys.sql_modules truncating definition

    Alexander Suprun (9/26/2014)


    SELECT [ObjectName], LEN([TSQLCommand]) FROM [dbo].[tblStoredProcedureAudit] ?

    procA 124255

Viewing 15 posts - 1 through 15 (of 85 total)