Forum Replies Created

Viewing 15 posts - 3,031 through 3,045 (of 8,731 total)

  • RE: Newbie Help working out a SQL Problem..

    To get the points per game, you need to divide the points by the games played. Then you need to get the greatest value using an aggregate function and grouping...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query to get all non-zero and first zero value rows if there are 2 consecutive Zero value rows

    This is one approach (assuming you posted on the correct forum).

    WITH CTE AS(

    SELECT

    ProductID,

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Help calculate the last day of the previous month

    If you're trying to format a textbox, use the format property with the following value.

    MMMM dd, yyyy

    If you're trying to format a parameter, just don't. Use the date/time type.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: NULL values on a LEFT JOIN

    SQLPain (4/14/2016)


    I am unable to get rows where ad.StatusAppDetail IS NULL. I am using the following code.

    SELECT DISTINCT

    ISNULL(Other, 0) AS Other

    FROM Chain AS C

    LEFT JOIN (SELECT

    Count(ad.AppID) as Other,

    C.DealerID

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Help calculate the last day of the previous month

    Like this?

    =DateAdd("d",-Day(Today()), Today())

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Ed Wagner (4/14/2016)


    Luis Cazares (4/14/2016)


    Ed Wagner (4/14/2016)


    SQLRNNR (4/14/2016)


    Luis Cazares (4/14/2016)


    Is this guy for real?

    How is it possible that he can't work out a basic DML statement and still have a...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Phil Parkin (4/14/2016)


    Steve Jones - SSC Editor (4/14/2016)


    Well, apparently I don't write good questions to teach these people things.

    Maybe some of you should write some questions to help people learn...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Ed Wagner (4/14/2016)


    SQLRNNR (4/14/2016)


    Luis Cazares (4/14/2016)


    Is this guy for real?

    How is it possible that he can't work out a basic DML statement and still have a job?

    Hopefully Hugo has him...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Is Date the Last Day of the Month

    A different option.

    SELECT YourDate,

    CASE WHEN MONTH(YourDate) <> MONTH(DATEADD(day, 1, YourDate)) THEN 'True' ELSE 'False' END,

    CASE WHEN YourDate = DATEADD( MM, DATEDIFF( MM,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Is Date the Last Day of the Month

    Hugo Kornelis (4/14/2016)


    CASE WHEN MONTH(YourDate) <> MONTH(DATEADD(day, 1, YourDate)) THEN 'True' ELSE 'False' END

    Fixed That For You

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Brandie Tarvin (4/14/2016)


    Ummmm. Ouch?

    Or does this really matter[/url] to anyone?

    I feel that many of these standards to certify processes are simply created to make money.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Reassign sequential group numbers to results of DENSE_RANK?

    drew.allen (4/14/2016)


    You need to be VERY CAREFUL with the quirky update. It is undocumented, not guaranteed, and requires a clustered index on the sort order. If you DO...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Is this guy for real?

    How is it possible that he can't work out a basic DML statement and still have a job?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: BCP Import Help

    I honestly don't know why it does that.

    I know however, that you can change the format file and set the column as SQLCHAR (leaving your table intact) and let it...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Can not get results to insert into table

    INSERT INTO goes before the whole statement, not before the SELECT from the derived table.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 3,031 through 3,045 (of 8,731 total)