Forum Replies Created

Viewing 15 posts - 946 through 960 (of 6,486 total)

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (6/25/2012)


    Why would NULL matter?

    CHAR(1) doesn't have extra overhead for the flexibility of string length. VARCHAR(1) adds that extra string length flexibility, therefore has added overhead. In a...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (6/25/2012)


    Matt Miller (#4) (6/25/2012)


    SQLRNNR (6/25/2012)


    Sean Lange (6/25/2012)


    Stefan Krzywicki (6/25/2012)


    Don't you love columns with "number" in the name that are typed as char or varchar?

    Or the date ones...

    InsertedDateTime int

    BAH!!!

    Or...

  • RE: Are the posted questions getting worse?

    SQLRNNR (6/25/2012)


    Sean Lange (6/25/2012)


    Stefan Krzywicki (6/25/2012)


    Don't you love columns with "number" in the name that are typed as char or varchar?

    Or the date ones...

    InsertedDateTime int

    BAH!!!

    Or VarChar(1)

    Wait though - is it...

  • RE: Past 3 month's average every month

    Presuming you're going after a rolling 3-month average, something like this gets you there (the first part of the CTE is purely to set up the test data you provided).

    ;with...

  • RE: Canceling Customers

    mbrooks (6/20/2012)


    Some of those "pinheaded MBAs" are narcissistic pinheaded MBAs that climbed over quite a few bodies to reach where they are, and lack any personal connection with their customers...

  • RE: Job run successfully but data does not load

    Is it actually set up to fail in some way if it doesn't find any new data? A lot of case could simply be something that filters out all...

  • RE: Parameter Q?

    You're probably looking at something like this instead if you NEED to use the month and year criteria:

    (

    year(manufacturing_start_time) >= @year and (month(manufacturing_start_time)>= @month)

    and (

    ...

  • RE: Parameter Q?

    Oh - my bad. the formatting made those statements disappear.

    That said your year and month criteria isn't equivalent to using the date. let's take a look at this:

    year(manufacturing_start_time) >=...

  • RE: Parameter Q?

    Your initial criteria allows for the ending date to be null. The other two don't allow for that (i.e. filter those out), which is why you are getting fewer...

  • RE: Aggregate Query question

    I keep associating districts with a geographical area, so I cannot help but think that using distance alone is not going to serve you well in this case. Would...

  • RE: Aggregate Query question

    Les Cardwell (6/19/2012)


    Lynn,

    It's a redistricting (route) requirement, where we're looking to contain each district to roughly the same number of meters (service locations). Urban growth and all that.

    That's interesting, because...

  • RE: Technology Guilt

    patrickmcginnis59 (6/18/2012)


    The question isn't whether disparity exists, it's whether the ability to move along the income spectrum exists.

    Everybody on the lower income spectrum would like to move along...

  • RE: Technology Guilt

    chrisn-585491 (6/18/2012)


    What exactly is scary?

    The last time the US income disparity was at this point was right before the Great Depression. :w00t:

    Imagine the economy as a database server. Right now...

  • RE: Technology Guilt

    chrisn-585491 (6/15/2012)


    "What I want is the people who buy into the claim that "wealth redistribution" will fix all the world's social problems to understand there is a difference between "needs"...

  • RE: How can I return value from function that comes from dynamic sql

    Lowell (6/14/2012)


    you can use a case statement to return a specific column value based ont heparameter passed:

    /*

    --Results

    2.3

    1.79

    */

    SELECT [dbo].[ExRateProc]('USD',GETDATE()) As Results

    SELECT [dbo].[ExRateProc]('oops',GETDATE()) As Results

    CREATE TABLE [dbo].[ExRates](

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

    [ratedate] [date]...

Viewing 15 posts - 946 through 960 (of 6,486 total)