Forum Replies Created

Viewing 15 posts - 751 through 765 (of 1,248 total)

  • RE: Split Row into Multiple Rows

    bugg (1/30/2015)


    Mark Cowne (5/3/2012)


    Join to a numbers/tally table

    SELECT s.ORDER_NUMBER, s.PRODUCT_ID, 1 AS QTY, s.VALUE/s.QTY AS VALUE

    FROM @SPLITROW s

    INNER JOIN master.dbo.spt_values t ON t.type='P'

    AND...

  • RE: Replication Filters

    TomThomson (1/26/2015)


    Nice straightforward question.

    Half the people who have replied so far think they can use a column filter to select rows, which is a bit startling; and more than four...

  • RE: UK Post code Area

    You're welcome. I've done some tinkering with postcodes myself in the past so I recognised what you were trying to do 🙂

  • RE: UK Post code Area

    SELECT

    left(Postcode,patindex('%[0-9]%',postcode)-1)

    FROM YourTable

    where patindex('%[0-9]%',postcode) > 0

    order by 3

    That should do the trick for all the...

  • RE: UK Post code Area

    Have all your postcodes definitely got numbers in them? I know they should have but it might be worth checking.

  • RE: UK Post code Area

    Have you got spaces in all your postcodes?

  • RE: UK Post code Area

    c.simpson (1/26/2015)


    I would like to extract the first part of the post code.

    for example I have

    AA1 2BB

    A1 2B

    A4 2BB

    I would like my field to ready

    AA

    A

    A

    Thanks

    left(Postcode,patindex('%[0-9]%',postcode)-1)

    Does that do what you...

  • RE: Just an idea ...

    That definitely sounds like a good idea. We've got some tables that are 300-ish columns wide and I'd said at least at third of those are all nulls (don't...

  • RE: Today's Random Word!

    Ed Wagner (1/20/2015)


    djj (1/20/2015)


    Diagnostic

    Tune-Up

    Flat

  • RE: The Identity Limit

    Richard Warr (1/20/2015)


    I thought it was 10^38 - 1 which works for a DECIMAL(38,0) type. That's a much bigger number than the BIGINT type gives you.

    That's what I thought too....

  • RE: Today's Random Word!

    Stuart Davies (1/16/2015)


    Ed Wagner (1/15/2015)


    djj (1/15/2015)


    Ed Wagner (1/15/2015)


    SQLRNNR (1/15/2015)


    Ed Wagner (1/15/2015)


    Taxes

    @$!%#$!^#

    Gouge

    Excess

    Spend

    Thrift

    Store

  • RE: Today's Random Word!

    Ed Wagner (1/15/2015)


    ChrisM@Work (1/15/2015)


    Ed Wagner (1/15/2015)


    ChrisM@Work (1/15/2015)


    BWFC (1/15/2015)


    richxs (1/15/2015)


    Giraffe DBA (1/14/2015)


    SQLRNNR (1/14/2015)


    Ed Wagner (1/14/2015)


    djj (1/14/2015)


    BWFC (1/14/2015)


    Ed Wagner (1/14/2015)


    Stuart Davies (1/14/2015)


    TomThomson (1/13/2015)


    Ed Wagner (1/13/2015)


    SQLRNNR (1/13/2015)


    regex

    Pattern

    Match

    Point

    Edge

    Bono

    Sonny

    Cher

    Babe (i've got you ...)

    Ruth

    Sultan

    Swing

    Swap

    Meet

    Potato

    Gravy

    Train

  • RE: Today's Random Word!

    richxs (1/15/2015)


    Giraffe DBA (1/14/2015)


    SQLRNNR (1/14/2015)


    Ed Wagner (1/14/2015)


    djj (1/14/2015)


    BWFC (1/14/2015)


    Ed Wagner (1/14/2015)


    Stuart Davies (1/14/2015)


    TomThomson (1/13/2015)


    Ed Wagner (1/13/2015)


    SQLRNNR (1/13/2015)


    regex

    Pattern

    Match

    Point

    Edge

    Bono

    Sonny

    Cher

    Babe (i've got you ...)

    Ruth

    Sultan

    Swing

  • RE: Today's Random Word!

    Ed Wagner (1/14/2015)


    Stuart Davies (1/14/2015)


    TomThomson (1/13/2015)


    Ed Wagner (1/13/2015)


    SQLRNNR (1/13/2015)


    regex

    Pattern

    Match

    Point

    Edge

    Bono

  • RE: Lowest of a few dates

    I did think your question was over-thinking things with CASE statements in there. You're right, MIN() won't work. Can you post some sample data please? This...

Viewing 15 posts - 751 through 765 (of 1,248 total)