Forum Replies Created

Viewing 15 posts - 226 through 240 (of 241 total)

  • RE: Need help using Database Engine Tuning Advisor

    If you select the first file then I believe the Tuning adviser will automatically use the additional files

    File

    Specify a .sql script or trace file for a workload. Specify the...

  • RE: Need help with ranking a query

    Sorry just noticed the requirement for a maximum of 8 rows per company

    with cte as (

    select

    Companyid

    ,asofdate

    ,period

    ,row_number() over(partition by Companyid, asofdate order by period) as rownum

    from temp)

    select *

    from...

  • RE: Need help with ranking a query

    Does this do what you need?

    with cte as (

    select

    Companyid

    ,asofdate

    ,period

    ,row_number() over(partition by Companyid, asofdate order by period) as rownum

    from temp)

    select *

    from cte

    where rownum = 1

  • RE: Windows Authentication mode

    shirish_padekar (12/16/2015)


    We have SQL Server 2012 and I found that we were using sa user in our application's connectionString. Now, we are thinking to replace it with Windows Authentication like...

  • RE: SSIS For each loop error

    Change the MaximumErrorCount property on the foreach loop to something greater than 1. This way if there is an error the loop will continue and will only fail if it...

  • RE: SQL server conversion error issue

    You could use a CTE or subquery to initially select the rows with valid dates or you could replace the CAST with TRY_CAST which will return null for invalid values...

  • RE: SQL server conversion error issue

    You have a cast in the where statement which is commented out. If this is part of the actual query it is possible that SQL will evaluate this first before...

  • RE: Audit

    Check out Audits and Server Audit Specifications. If I remember correctly the SERVER_PRINCIPAL_CHANGE_GROUP will track changes to logins.

  • RE: Happy Thanksgiving 2015

    Larnu (11/26/2015)


    Unless I'm doing something funny, when I run D, I actually get 27/11/2015 (when i run it for this year, sorry, I forgot to mention that). Just me?

    It only...

  • RE: Which gives the greatest points?

    Nice fun question to end the week.

    Random fact time. A try is called a try as it originally didn't score any points. It allowed the scorer to have a try...

  • RE: SQL Server Logins

    Can you use another user who can log in, and if you look in the SQL logs there should be entries in here to do with the failed login that...

  • RE: SQL Server Logins

    What is the full error message you get?

  • RE: Need Help with Business Logic in a Stored Procedure

    What parts are you having issues with?

    Post what you have written already along with some sample data.

  • RE: While loop to replace text - how to re-write to use set processing

    ScottPletcher (8/12/2015)


    Here's a method without an external function, just out of curiosity mostly about how it would perform vs. other methods. It uses a "standard" tally table. This...

  • RE: While loop to replace text - how to re-write to use set processing

    Thank you Luis. I will have a play about with this so I understand fully what it is doing but after a first test, on a million rows, using only...

Viewing 15 posts - 226 through 240 (of 241 total)