Forum Replies Created

Viewing 15 posts - 6,286 through 6,300 (of 7,168 total)

  • RE: Help with nested transactions in stored procedures and triggers causing Msg 266.

    mister.magoo (6/1/2011)


    CREATE TRIGGER SampleTrigger ON SampleTranTest AFTER INSERT

    AS

    SET NOCOUNT ON;

    DECLARE @opentran INT;

    SELECT @opentran = @@TRANCOUNT;

    IF 1=1 -- some real error condition

    BEGIN

    -- an error is to be raised...

  • RE: Help with nested transactions in stored procedures and triggers causing Msg 266.

    In my opinion you're asking for trouble using rollback in a trigger for this very reason. If you want to go there then you'll have to use SAVE TRANSACTION which...

  • RE: memory pressure err messages..

    -- credit to Bob Beauchemin: http://social.msdn.microsoft.com/Forums/en-US/sqlnetfx/thread/bbc1c753-c5df-4d52-a567-c982cf506051

    SELECT SUM(pages_allocated_count) / 128.0 AS CLR_memory_MBs

    FROM sys.dm_os_memory_objects

    WHERE type LIKE '%CLR%' ;

  • RE: INSERT IF NOT EXISTS

    Make sure you understand this code before deploying it.

    IF EXISTS ( SELECT *

    FROM sys.objects

    ...

  • RE: HTML Report using SQL

    This seems like a lot more work than it should be...is SSRS available in your environment or can it be made available? SSRS is the recommended solution for this type...

  • RE: Blank String to NULL/DateTime???

    Happy to assist 🙂

    As an aside, LTRIM and TRIM and RTRIM run against a string with all spaces will yield the same result...and TRIM may have additional overhead since...

  • RE: Blank String to NULL/DateTime???

    It depends on the type of incoming string but here is what it will look like for DT_STR 100 with 1252 encoding:

    LTRIM(ColumnName) == "" ? (DT_STR,100,1252)NULL(DT_STR,100,1252) : ColumnName

    Reference:

    SSIS NULL function:...

  • RE: Problem With Recursive CTE

    Jeff Moden (5/30/2011)


    Are you suggesting that you want only leaf-level information no matter which part you ask for? 🙂

    That's what I got out of it this time around but I...

  • RE: Problem With Recursive CTE

    Yikes! ...the "bill of materials" comment should have tipped me off. Good catch Jeff!

    With this set of test data it is much clearer what is required.

  • RE: Problem With Recursive CTE

    Excellent, happy to assist 🙂 Thanks for posting back!

  • RE: Encryption and indexes

    I do not know of the top of my head but it's an interesting question so thanks for asking it here 🙂

    Do you have a test system where you can...

  • RE: Blank String to NULL/DateTime???

    Here's where I would start:

    1) Import it as a string from the text file.

    2) Use the Derived Column transformation to change columns with blanks to NULL.

    3) Use the Data Type...

  • RE: join operator "=*"

    Uripedes Pants (5/27/2011)


    opc.three - yeah, I realise this is a 2008 forum, but I had to make a decision. I knew it was old syntax, but I'm working in 2008r2,...

  • RE: join operator "=*"

    The Dixie Flatline (5/27/2011)


    That is deprecated syntax for doing a join.

    It has been deprecated since SQL 2005 and support will be officially dropped from the next version of SQL Server...

  • RE: join operator "=*"

    The =* JOIN-syntax is only valid when a 2008 database (the forum you posted in) is in 80 compatibility mode.

    If you think you may run into this a lot...

Viewing 15 posts - 6,286 through 6,300 (of 7,168 total)