Forum Replies Created

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

  • RE: Use only date part of datetime field for GROUP BY

    Edvard Korsbæk (2/4/2015)


    Hi All!

    I have this table:

    [dbo].[Login_details](

    [login_data_id] [int] IDENTITY(1,1) NOT NULL,

    [login_no] [int] NULL,

    [logindate] [datetime] NULL,

    [logoutdate] [datetime] NULL,

    CONSTRAINT [PK_Login_details] PRIMARY KEY CLUSTERED

    (

    [login_data_id] ASC

    )

    This query:

    Select count(*) from dbo.Login_details group by...


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • RE: Quintessential Or Elegant

    Sqlraider (2/2/2015)


    Iwas Bornready (2/2/2015)


    Sometimes (always?) it just comes down to time and money. I can give it to you quick and dirty today or elegant tomorrow. If I go elegant...


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • RE: Today's Random Word!

    Lock


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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...


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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...


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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 🙂


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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...


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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.


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • RE: UK Post code Area

    Have you got spaces in all your postcodes?


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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...


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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...


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • RE: Today's Random Word!

    Ed Wagner (1/20/2015)


    djj (1/20/2015)


    Diagnostic

    Tune-Up

    Flat


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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....


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • 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


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

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