Forum Replies Created

Viewing 15 posts - 5,521 through 5,535 (of 7,608 total)

  • RE: Space Problems

    To be sure, make SQL update the page (and row) usage counts and see if there are any large discrepancies:

    DBCC UPDATEUSAGE ( '<your_db_name>' )

  • RE: Date Table

    Jeff Moden (12/25/2014)


    CELKO (12/25/2014)


    Why do some companies use weird Fiscal Years, such as starting in April? What is the purpose there?

    The last time I looked the GAAP had...

  • RE: 15 Quick Short Interview Questions Useful When Hiring SQL Developers

    Jeff Moden (12/25/2014)


    ScottPletcher (12/25/2014)


    Geoff A (3/3/2013)


    Jeff Moden (2/28/2013)


    Shifting gears a bit, I’m glad that these are essay-style questions so that I could write in what I believe is a more...

  • RE: 15 Quick Short Interview Questions Useful When Hiring SQL Developers

    Geoff A (3/3/2013)


    Jeff Moden (2/28/2013)


    Shifting gears a bit, I’m glad that these are essay-style questions so that I could write in what I believe is a more correct answer in...

  • RE: 15 Quick Short Interview Questions Useful When Hiring SQL Developers

    Excellent! Best overall set of SQL developer interview qs I've ever seen.

  • RE: Date Table

    I think this is a much simpler method:

    DECLARE @first_fiscal_year smallint

    DECLARE @number_of_years tinyint

    SET @first_fiscal_year = 2014

    SET @number_of_years = 10

    ------------------------------------------------------------------------------------------------------------------------

    DECLARE @fiscal_years TABLE (

    year smallint PRIMARY KEY,

    ...

  • RE: Unused Procedure lists - Most easiest way

    Keep in mind that procs are listed only as long as they are in the cache. On a memory-constrained or busy server, stats could be lost/removed. Also, whenever...

  • RE: Date column with 1900-01-01 value

    gissah (12/23/2014)


    Thanks that is what I ended up doing with a subquery.

    select pt.projinvoiceprojid,MIN(CAST(pt.PROJECTEDSTARTDATE AS DATE)) AS 'SOPOrderDate_ProjectStartDate'

    from projtable pt

    where pt.PROJECTEDSTARTDATE !='1900-01-01'

    group by pt.projinvoiceprojid

    order by pt.projinvoiceprojid

    Be careful! Do...

  • RE: Killing all sessions and restoring the database

    Markus (12/23/2014)


    They way I do my refresh db jobs is the first step of the job is the kill step, second step is restore. They happen back to back...

  • RE: Challenge - Loading 120M records within 21 hours

    Michael Valentine Jones (12/20/2014)


    Could you try the statement below on a development or test server using a full sized table?

    The storage size for numeric precision of 12 or 18 is...

  • RE: Killing all sessions and restoring the database

    KILL is never a verified way to do this. A session(s) could immediately restart itself and start using the db again.

    If you don't want to use "SINGLE_USER WITH ROLLBACK...

  • RE: Convert datetime to bigint

    Ray Herring (12/22/2014)

    I did say that the Date and Time are integers

    I missed that I think, where was it?

  • RE: Replacing string values

    Here's an alternative:

    declare @children int

    set @children = 4

    SELECT

    string,

    STUFF(string, start_of_integer_value, CHARINDEX('<', string, start_of_integer_value) - start_of_integer_value,

    CAST(@children...

  • RE: delete user of db in sql server

    Replace "<your_db_name>" with the restored db name:

    ALTER AUTHORIZATION ON DATABASE::<your_db_name> TO sa

    USE <your_db_name>

    DROP USER <user_name>

  • RE: Formatting output of query, need help

    I typically see %s with one decimal place. If you want more, adjust the "decimal(4, 1)" to (5, 2) or whatever you prefer.

    SELECT EmailID, Email

    ,[%...

Viewing 15 posts - 5,521 through 5,535 (of 7,608 total)