Forum Replies Created

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

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

  • RE: That old conversion failed Date Time error

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

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

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

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

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

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

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

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

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

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

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

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

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

  • RE: Correction Needed

    rcooper 78099 (3/17/2016)


    Really?

    You said: You're missing the closing parenthesis for your cte.

    You also have an additional semi-colon at the start and a missing semi-colon at the end of your...

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