Forum Replies Created

Viewing 15 posts - 1,876 through 1,890 (of 6,401 total)

  • RE: Cursor stop query at specific time

    Please don't cross post questions, it fragments replies.

    http://www.sqlservercentral.com/Forums/Topic1732107-3411-1.aspx

  • RE: Installation Error on 2012 Server

    Warning can be skipped, errors cannot.

    Your installing SQL on a server edition that has Windows Firewall, it is warning you that you must change the firewall settings in order to...

  • RE: Required Permissions to Enable A Mirroring Session

    You running any server audits?

  • RE: format field

    Would be a string concatination due to needing the H in the middle.

    Something like

    select

    rowid,

    datemeeting,

    RIGHT('00'+convert(varchar(2),hoursmeeting),2) +'H'+ RIGHT('00'+convert(varchar(2),minutemeeting),2)

    from @tbl

  • RE: Disabling Index operations for certain tables in SQL Server 2008 R2 other than DDL trigger

    Jayanth_Kurup (10/29/2015)


    You could use Policy based Management which will prevent any operations that violate the defined policy

    Automatic prevent (OnChange:Prevent) policies use DDL triggers to enforce the policy, so it would...

  • RE: Foreign Keys

    I found the following script while google'ing the other day to script out the drop and creates of all the FK's in a DB.

    Apologies to the source, I can't remember...

  • RE: Calculating elapsed time between records

    First itteration.

    Looks a bit ugly, sure someone can tidy it up or suggest another way

    ;with cte as

    (

    select empid, datediff(day,end_date,start_date) as inactivedays from

    (

    select

    empid, start_date,

    case when end_date is null then (select max(end_date)...

  • RE: Calculating elapsed time between records

    So a rolling total of sorts?

    So based on the sample data of

    create table #test (empid int, start_date datetime, end_date datetime)

    insert into #test values

    (1001,'1998-01-01','2003-06-21'),

    (1001,'2004-08-19',NULL),

    (1002,'1999-05-23','2008-03-28'),

    (1002,'2008-11-02',NULL),

    (1003,'2004-10-12','2006-07-25'),

    (1003,'2009-05-17',NULL),

    (1004,'2005-04-28',NULL)

    You want the output of

    1001 - 2019-03-02

    1002 -...

  • RE: CASE WHEN SELECT Help.

    WHEN A.[Measure] IN ('N2F-03') AND A.Value < M.Threshold THEN 'LimeGreen'

    Are all the value fields for this measure numbers or not?

  • RE: Today's Random Word!

    Ed Wagner (10/29/2015)


    anthony.green (10/29/2015)


    crookj (10/29/2015)


    Toss

    Salad

    Greens

    Me

  • RE: Calculating elapsed time between records

    Can you give expected outcome please?

    If I understand, the output should be

    empid, years_service

    1001, 11

    1004, 10

    1002, 7

    1003, 6

    create table #test (empid int, start_date datetime, end_date datetime)

    insert into #test values

    (1001,'1998-01-01','2003-06-21'),

    (1002,'1999-05-23','2008-03-28'),

    (1001,'2004-08-19',NULL),

    (1003,'2004-10-12','2006-07-25'),

    (1004,'2005-04-28',NULL),

    (1002,'2008-11-02',NULL),

    (1003,'2009-05-17',NULL)

    select

    empid,

    start_date,

    datediff(year, start_date, getdate())

    from...

  • RE: SQL instance cannot use all CPU cores

    Yeah, they changed the licensing model as well between 2008 and 2008R2 with the addition of the Data Center edition.

    We toyed with the idea of upgrading but would of cost...

  • RE: Send a scheduled report once on demand to distribution list

    Do you have access to the SQL Agent where the ReportServer database is stored?

    If so you could just find the job with the GUID for your subscription in question and...

  • RE: SQL instance cannot use all CPU cores

    The maximum number of processors 2008R2 can see is 8.

    I am guessing the cpu's your seeing have all been set to 10x1 core vCPU's instead of 2x5core vCPU's

  • RE: Today's Random Word!

    crookj (10/29/2015)


    Toss

    Salad

Viewing 15 posts - 1,876 through 1,890 (of 6,401 total)