Forum Replies Created

Viewing 15 posts - 5,626 through 5,640 (of 8,731 total)

  • RE: Trying to join tables and only pull back certain values

    Using sqlfiddle, I was able to test this:

    WITH wos AS(

    SELECT Id,

    wo,

    wodate,

    ...

    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: Trying to join tables and only pull back certain values

    I'm sure that there's a more efficient solution in 2012 using LEAD() but I don't have access to a 2012 instance right now.

    WITH wos AS(

    SELECT Id,

    ...

    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: TSQL BRAIN FREEZE

    Maybe something like this:

    SELECT

    ,[DATE]

    FROM [dbo].[DATA]

    WHERE ( = '12345' OR = '67890')

    GROUP BY , [DATE]

    HAVING...

    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: Review on SELECT query

    Did you leave something out of your post? There seems to be no reason to have the 3 left joins in that query as it is.

    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: convert type sql 2008

    If your int looks like 20141022 (for today's date), you need to convert it to char(8) and then to date. If it's a numeric value representing the date as 41932...

    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?

    I really feel bad for this guy. He keeps posting weird problems about SPs full of bad practices. I'm sure that he isn't the problem and the problem comes from...

    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 (10/22/2014)


    GilaMonster (10/22/2014)


    Similarly, if you invite people for a braai here, there better not be just burgers, though we don't have tradition of smoking stuff.

    Isn't it interesting how so...

    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: Quick health check / environment synopsis

    Do you mean, something like Brent Ozar [/url] or Ola Hallengren[/url] scripts?

    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?

    Eirikur Eiriksson (10/21/2014)


    Ed Wagner (10/21/2014)


    Luis Cazares (10/21/2014)


    Eirikur Eiriksson (10/21/2014)


    Ed Wagner (10/21/2014)


    Eirikur Eiriksson (10/21/2014)


    Luis Cazares (10/21/2014)


    Eirikur Eiriksson (10/21/2014)


    spaghettidba (10/21/2014)


    Ed Wagner (10/21/2014)


    Parma, Venice...these cities are making me think of authentic Italian food....

    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?

    Eirikur Eiriksson (10/21/2014)


    Ed Wagner (10/21/2014)


    Eirikur Eiriksson (10/21/2014)


    Luis Cazares (10/21/2014)


    Eirikur Eiriksson (10/21/2014)


    spaghettidba (10/21/2014)


    Ed Wagner (10/21/2014)


    Parma, Venice...these cities are making me think of authentic Italian food. I cook and am 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: Syntax error with pivot table

    Do you have a BEGIN with no END?

    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?

    Eirikur Eiriksson (10/21/2014)


    spaghettidba (10/21/2014)


    Ed Wagner (10/21/2014)


    Parma, Venice...these cities are making me think of authentic Italian food. I cook and am a HUGE fan of real Italian, so now I'm...

    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: Syntax error with pivot table

    Do you have something else in your code? Are you missing an end?

    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: Syntax error with pivot table

    Your pivot statement is correct, your syntax error might be elsewhere.

    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: getting custom week data from daily data

    I'm not sure that CONVERT alone can help.

    Here's an example on how to group by weeks with unusual start days.

    WITH E1(N) AS (

    ...

    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 - 5,626 through 5,640 (of 8,731 total)