Forum Replies Created

Viewing 15 posts - 1,861 through 1,875 (of 3,957 total)

  • RE: How to Get The Most Filled Records from Similar Records

    Something like this to get you started perhaps?

    WITH SampleData AS (

    SELECT ID=ROW_NUMBER() OVER (ORDER BY (SELECT NULL))

    ,MyString=REPLACE(MyString,...

  • RE: Split a String

    Many ways to skin this cat:

    WITH SampleData AS (

    SELECT val=REPLACE(val, '.', '#')

    FROM (VALUES ('10.0||14.5'), ('2||34'), ('7.1||19'), ('4||11.7') ) v(val))

    SELECT C1=REPLACE(PARSENAME(REPLACE(val, '||', '.'),...

  • RE: Recursive Update Trigger

    Sean Lange (3/13/2013)


    Erin-489205 (3/13/2013)


    I am trying to create an update trigger that updates isactive field depending on different criteria.

    If DateField1 is >= GETDATE() OR DateField2 >= GETDATE() AND Extension =1...

  • RE: Time Problem

    dajonx (3/7/2013)


    Thank you!

    Is there a way to figure this out?

    Time ...

  • RE: Time Problem

    I'm not sure if this has been suggested but I think it will be pretty fast:

    declare @t table (dt datetime)

    insert @t values ('2013-03-02 13:40:00'),

    ('2013-03-02 14:00:00'),('2013-03-02 14:20:00'),

    ('2013-03-02 14:30:00'),('2013-03-02 14:50:00'),

    ('2013-03-02 15:00:00'),('2013-03-02 17:00:00');

    SELECT...

  • RE: Split A String into 4 parts

    Here's another way:

    SELECT ItemNumber, Item

    FROM PatternSplitCM('Notes_20130204_003015.txt', '[._]')

    WHERE Matched = 0

    PatternSplitCM is described in the 4th article in my signature.

  • RE: Group a set of chain values

    Of course, I could be wrong as Eugene has proven in the past.

    I think his query may be workable. All you'd need to do is UNPIVOT the two columns....

  • RE: Group a set of chain values

    dwain.c (3/11/2013)


    I have a question about group #2. Shouldn't it actually be two groups:

    Group unit

    1 ...

  • RE: Filtering by StatusId

    I believe this article by Gail Shaw will provide you the answers you seek:

    Catch-all Queries[/url]

  • RE: Group a set of chain values

    I have a question about group #2. Shouldn't it actually be two groups:

    Group unit

    1 ...

  • RE: Are the posted questions getting worse?

    Jeff Moden (3/8/2013)


    ...Since I'm mostly a data troll...

    Does that mean you live under a bridge on Al Gore's information superhighway?

  • RE: Are the posted questions getting worse?

    SQLRNNR (3/7/2013)


    Jeff Moden (3/7/2013)


    Paul White (3/7/2013)


    Jeff Moden (3/7/2013)


    I just can't understand why anyone would actually use XML. 😉

    The only possible reason is so you can say your indexes are SeXI.

    That...

  • RE: Asking If I can Create a table for prices

    Conceptually, product prices are usually retained in Price Lists. In your case, the price list happens to be by city but what happens when you have different customers in...

  • RE: Performing strange conditional COUNT

    ChrisM@Work (3/7/2013)


    Nice one geezer 😎

    It makes for a surprisingly succinct query.

    Good thing I'm not getting paid by the keystroke. 🙂

  • RE: Cursor replacement help

    oliver.morris (3/7/2013)


    Thanks for the help this makes sense. The query works considerably faster. However I have one issue. Each part needs to run in order e.g.

    For the 1st ID -...

Viewing 15 posts - 1,861 through 1,875 (of 3,957 total)