Forum Replies Created

Viewing 15 posts - 7,126 through 7,140 (of 7,608 total)

  • RE: select records between a date range

    [Removed, duplicate post.]

  • RE: select records between a date range

    Sean Lange (10/9/2012)


    maryjane9110024 (10/9/2012)


    Hi! I am trying to select records between July 1st 2011 and August 14, 2011. I am not returning any rows at all. I have searched and...

  • RE: Missing Index

    It's also possible you need the other index instead, rather than in addition to, the one you have know.

    You always need to look at the usage stats too when looking...

  • RE: Automating security within triggers

    Or just add the required permission(s) to the model db. Every db created after that will automatically have the same permission(s).

  • RE: T-sql select - like

    jarid.lawson (10/8/2012)


    ScottPletcher (10/8/2012)


    SELECT lastname

    FROM HR.Employees

    WHERE

    lastname LIKE '%[/]%' AND

    lastname NOT LIKE '%[/]%[/]%'

    Still have to add the line that removes / in the first...

  • RE: BULK Insert zwischen Datenbanken

    SQL Server muss immer the log gescrieben.

  • RE: T-sql select - like

    SELECT lastname

    FROM HR.Employees

    WHERE

    lastname LIKE '%[/]%' AND

    lastname NOT LIKE '%[/]%[/]%'

  • RE: Using case in updating column

    Michael T2 (10/5/2012)


    actually that wont work, if shipweight2 and shipweight3 are both null it will update them both. I dont want that

    No, if both are NULL, only shipweight2 will UPDATE,...

  • RE: TempDB avg_write_stalls

    Yeah, 217 is basically awful. Typically you want to see ~(20-)30ms, although the "base" time will vary depending on your specific disk configuration, of course.

  • RE: Using case in updating column

    Very close. I would make some slight adjustments as follows:

    UPDATE dbo.weights

    SET

    shipweight2 = CASE WHEN shipweight2 IS NULL THEN @weight ELSE shipweight2 END,

    ...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    Eugene Elutin (10/4/2012)


    ScottPletcher (10/4/2012)


    I don't think such extremely simplistic rules always work well in tables, large or small.

    Choosing the best indexes takes a lot of careful consideration of your data...

  • RE: t-sql - days to week and days

    Jeff Moden (10/3/2012)


    sqlserver12345 (10/2/2012)


    How do I convert days into weeks and days

    Ex:350 days = 50 0/7 weeks

    351 days = 50 1/7 weeks

    352...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    Jeff Moden (10/3/2012)


    ScottPletcher (10/3/2012)


    Determing the appropriate column actually takes analysis; again, there is no one-rule-fits-all-tables for the best clustered key column.

    Customer ids are usually unique and ever-increasing; narrowness is sometimes...

  • RE: UNIQUEIDENTIFIER vs BIGINT

    Jeff Moden (10/3/2012)


    Use the clustered index for a more appropriate column

    For large tables, the "appropriate column" is usually unique, narrow, and ever-increasing. "Customer Code" columns almost never meet all...

  • RE: t-sql - days to week and days

    --

    --

    SELECT

    col1, col2, days,

    CAST(days / 7 AS varchar(5)) + ' ' + CAST(days % 7 AS varchar(1)) + '/7' AS weekdays

    FROM...

Viewing 15 posts - 7,126 through 7,140 (of 7,608 total)