Forum Replies Created

Viewing 11 posts - 16 through 26 (of 26 total)

  • RE: CASE WHEN statement Within a Trigger

    lnoland (10/26/2010)


    zlthomps (10/21/2010)


    Would this even remotely be close?

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    go

    CREATE TRIGGER [EquityLeadDeDup]

    ON [dbo].[WebLead]

    INSTEAD OF INSERT

    AS

    BEGIN

    SET NOCOUNT ON;

    DECLARE @EQ_CID INT,

    @EQ_MsgDate SMALLDATETIME,

    @EQ_ToAddress VARCHAR(64),

    @EQ_LeadType INT

    IF EXISTS(

    SELECT

    ...

  • RE: CASE WHEN statement Within a Trigger

    CELKO (10/22/2010)


    1) CASE is an expression and not a statement in SQL. You can use IF-THEN_ELSE constructs in T-SQL or your host language.

    2) Audits are done outside of the...

  • RE: CASE WHEN statement Within a Trigger

    Would this even remotely be close?

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    go

    CREATE TRIGGER [EquityLeadDeDup]

    ON [dbo].[WebLead]

    INSTEAD OF INSERT

    AS

    BEGIN

    SET NOCOUNT ON;

    DECLARE @EQ_CID INT,

    @EQ_MsgDate SMALLDATETIME,

    @EQ_ToAddress VARCHAR(64),

    @EQ_LeadType INT

    IF EXISTS(

    SELECT

    @EQ_CID,...

  • RE: CASE WHEN statement Within a Trigger

    IF Boolean_expression

    { sql_statement | statement_block }

    [ ELSE

    { sql_statement | statement_block } ]

    Doesnt look like your recommendation...

  • RE: CASE WHEN statement Within a Trigger

    SeanLange (10/20/2010)


    You could make it do some checking and decide what to do with it.

    create trigger myInsertTrigger

    instead of insert on MyTable

    as begin

    if exists(select field from MyTable) then

    ...

  • RE: CASE WHEN statement Within a Trigger

    GSquared (10/20/2010)


    "Case" doesn't work that way in SQL. It does in VB, but not in SQL. "Case" is a select option in SQL, not a flow-control statement.

    E.g.:

    select case...

  • RE: Nested Case Statement Trouble

    Here is the full Script... Tele sense is throwing an error at the INSERT statement where I am trying to populate the temp table.

    DECLARE

    ...

  • RE: Need Help w/ XML Query

    Now that Im thinking about it, is it even possible to query xml from a column with a data type other than xml? 😀

  • RE: Locking Issue with a .NET Provider App

    Gift Peddie (2/23/2009)


    I have looked are your code many times and I did not see any transactions and you are not using cursor which uses implicit transactions like fetch. ...

  • RE: Locking Issue with a .NET Provider App

    Anybody have an ideas on this? Thanks for any help.

    Zach

  • RE: Locking Issue with a .NET Provider App

    Thanks for moving this, Steve.

Viewing 11 posts - 16 through 26 (of 26 total)