Forum Replies Created

Viewing 15 posts - 3,166 through 3,180 (of 8,731 total)

  • RE: Query slow just once a day

    The major difference from the 2 runs seems to be the physical reads from a table. When it's slow, it's reading 12-13 thousand pages from disk. When it's fast, 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: Pivot table

    Use cross tabs with the OVER clause.

    SELECT *,

    SUM(CASE WHEN Status = 'Passed' THEN NumberOfTasks ELSE 0 END) OVER(PARTITION BY Cycle) AS [Passed],

    SUM(CASE...

    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: That old conversion failed Date Time error

    Check the defaults for your parameters or avoid your report from executing automatically.

    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: Wildcard parameter for multiple searches

    The error indicates problems when creating your dates. Try this formulas instead.

    set @START_DATE = DATEADD(MM, @START_MONTH - 1, @START_YEAR);

    set @END_DATE = DATEADD(MM, CAST(@END_MONTH AS int), @END_YEAR);

    Review the parameters you're sending...

    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 (3/21/2016)


    Brandie Tarvin (3/21/2016)


    For those of you with standing desks, ArsTechnica says it may not be helping[/url] you at all.

    Here is an alternative[/url]

    😎

    Now, that's a great idea. I'm not...

    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: Typing Spelling error check

    Jeff Moden (3/18/2016)


    Luis Cazares (3/18/2016)


    I agree with all that has been said. But, maybe you could make it work implementing Full-Text Search? This is only if you already have problems...

    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 slow just once a day

    Eirikur Eiriksson (3/18/2016)


    Luis Cazares (3/18/2016)


    Eirikur Eiriksson (3/18/2016)


    Luis,

    you might be chasing Red Herrings here, does this happen just after the full backups?

    😎

    Define "just after the full backups". It happens when the...

    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 count distinct warehouses per order and get the total

    If you're using a query, you could get the calculation there.

    COUNT(DISTINCT wh) OVER(PARTITION BY Name, OrderNum) AS WH_Count

    I'm not sure how to do it in SSRS.

    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 slow just once a day

    Eirikur Eiriksson (3/18/2016)


    Luis,

    you might be chasing Red Herrings here, does this happen just after the full backups?

    😎

    Define "just after the full backups". It happens when the query is first run...

    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: How to find out what databases have not being used for a year

    I haven't met a read-only database, so you could probably compare backups.

    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: Typing Spelling error check

    I agree with all that has been said. But, maybe you could make it work implementing Full-Text Search? This is only if you already have problems with this data, if...

    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: how to avoid bad character in sql server

    spaghettidba (3/18/2016)


    Luis Cazares (3/18/2016)


    I prefer to use a nice pattern instead of learning ASCII values. But that's just me. 😀

    Me too, but for some reason it didn't catch all the...

    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: Add Date Stamp to File created using 'INTO' Statement

    Just a word of advice.

    This will become annoying in the future, you'll end with hundreds of tables all with the same structure. You'd be better by creating a table with...

    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: how to avoid bad character in sql server

    I prefer to use a nice pattern instead of learning ASCII values. But that's just me. 😀

    SELECT *

    FROM @sampleData AS s

    CROSS APPLY (

    SELECT Name = (

    SELECT SUBSTRING(s.name, number, 1) 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
  • RE: Converting Questionable Dates

    g.maxfield (3/18/2016)


    Looks like another version error issue! How do we know until we test the code? Could the version number be added to the Question then in that...

    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,166 through 3,180 (of 8,731 total)