Forum Replies Created

Viewing 15 posts - 6,076 through 6,090 (of 15,381 total)

  • RE: need help with trigger

    toneranger (12/18/2013)


    Is it possible to set a field value in a table based on 2 field values in 2 different tables? Which table gets the trigger?

    Triggers are like events for...

  • RE: Need help in SP

    Jeff Moden (12/18/2013)


    amy26 (12/18/2013)


    So, wherever you go...there you are? 😀 Hehe, sorry couldn't resist. 🙂

    DBCC TIMEWARP on sterioids. '-)

    That is the circular referenced verbose version. 😀

  • RE: Substring with patindex

    Like this?

    CREATE FUNCTION dbo.fn_parsename

    (

    @pString VARCHAR(7999),

    ...

  • RE: Substring with patindex

    You will end up with something similar to this.

    declare @Something table (SomeValue varchar(50))

    insert @Something(SomeValue) values('01-08-087-0101W5')

    select *

    from @Something

    cross apply dbo.DelimitedSplit8K(SomeValue, '-')

  • RE: Substring with patindex

    Take a look at the link in my signature about splitting strings. This is probably the best approach for what you are trying to do here.

  • RE: logic help

    cdl_9009 (12/18/2013)


    I am trying to write logic that says:

    (( Status = 'P' --PENDING

    AND TYPE = 'P' ) --PRIMARY

    OR (STATUS = 'C' --CURRENT

    ...

  • RE: Need help

    I guess you didn't like my response on your first version of this question? http://www.sqlservercentral.com/Forums/Topic1524214-149-1.aspx

    When you create multiple threads on the same topic your responses get fragmented and it is...

  • RE: Best Practice Question - Reference Tables

    I didn't realize the entire scope of the issue on my first post.

    You may have to go so far as adding an ItemCodeEffectiveDate to your main table to so you...

  • RE: Update stmt with in a cursor

    mcfarlandparkway (12/18/2013)


    Using these two querys

    Select * from SNLunchSevereNeeds Where SystemCertificationID in(

    Select SystemCertificationID from SNSystemCertification where FiscalYear=2014 and

    SystemID=749 And IsActive=1 )

    Select * from SNLunchSevereNeeds Where SystemCertificationID in(

    Select...

  • RE: Need help in SP

    You don't need all the extra variables and such in these calculations either. Everything is based off getdate() so there is no need to store interim values. This can all...

  • RE: Need help in SP

    MysteryJimbo (12/18/2013)


    CK2 (12/18/2013)


    I would use the OUTPUT Parameter approach suggested.

    It's more appropriate given the circumstances you describe.

    I wouldn't use that approach for a simple date calculation. There are no table...

  • RE: Update stmt with in a cursor

    Hi and welcome to the forums. Why do you need a cursor for this? From what you posted I think you can replace the entire body of your stored proc...

  • RE: Return Parent Record value from child records

    sturner (12/18/2013)


    I'm not a proponent of having parents and children in the same table - the justification hasn't ever been made other than being able to have everything in one...

  • RE: Best Practice Question - Reference Tables

    You should have a primary key on your table. Since you have two columns and the values can be changed for either of them you should add an identity column....

  • RE: Delete duplicate row based on one column, but need to retain rest of the values in tmp file

    Gillian_Pappas2002 (12/18/2013)


    My posts look fine in preview then get messed up when I post it. Sorry. I have included an attachment.

    Thanks for all of your help.

    Displaying tabular information...

Viewing 15 posts - 6,076 through 6,090 (of 15,381 total)