Forum Replies Created

Viewing 15 posts - 5,461 through 5,475 (of 8,761 total)

  • RE: Time differences between different intervals

    Simple solution

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    IF OBJECT_ID(N'dbo.TBL_SAMPLE_STATUS') IS NOT NULL DROP TABLE dbo.TBL_SAMPLE_STATUS;

    CREATE TABLE dbo.TBL_SAMPLE_STATUS

    (

    Timestamp DATETIME...

  • RE: Database Recovery Process /Crash recovery

    DicksonMulwa (4/30/2015)


    What is the logic used by the DB recovery/Crash Recovery process while recovering uncommitted data. Does it simply rollback all changes? Say, for example, if a database crashes before...

  • RE: Indexes Fragment Really Quickly

    SQLDB101 (5/1/2015)


    My question is, how can the indexes in Environment-2 fragment so much more quickly than the indexes in Environment-1? Both environments are on exactly the same hardware and have...

  • RE: How to reduce MDF file size ?

    WhiteLotus (4/30/2015)


    Eirikur Eiriksson (4/30/2015)


    WhiteLotus (4/30/2015)


    HI ALL,

    Can I change the Initial Size into 1 GB for example ?

    No, you cannot reduce the size of this file without either purging data or...

  • RE: Complete weeks

    sharonsql2013 (4/30/2015)


    I need to divide a number by the number of full weeks based on today's date.

    Say today is April 30 which is Week 18th but since its the middle...

  • RE: Using "Try-Catch" and "Rollback" on read only stored procedure

    Quick thought, looks to me like an overkill unless IMPLICIT_TRANSACTIONS are set ON in either the code or the Server's Connection Properties.

    😎

  • RE: How to reduce MDF file size ?

    WhiteLotus (4/30/2015)


    HI ALL,

    Can I change the Initial Size into 1 GB for example ?

    No, you cannot reduce the size of this file without either purging data or compacting/compressing the content.

    😎

    My...

  • RE: Finding Problem Code

    Steve Jones - SSC Editor (4/30/2015)


    ...but where do you start?

    Good question Steve, I'm chipping in my 2 Cents

    😎

    Finding a problematic code which hasn't been executed since the last reboot or...

  • RE: Datediff

    sharonsql2013 (4/30/2015)


    Does datediff hinders performance in queries.

    I am trying to access the records and it takes almost 40 seconds to filter out of 180000 rows. Which is not much of...

  • RE: Help Needed in set based Query

    Simple solution using the DelimitedSplit8K [/url]function

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    declare @Address table(Id int primary key identity(1,1),Address varchar(100),city varchar(20),State varchar(20))

    insert into @Address

    select '123 sheril street, Newyork,NY','Newyork','NY' union all

    select '333 bamboo street, Manhattan,NY',...

  • RE: Uninstalling SQL 2012

    Quick thought, safe your self from any future grieve and wipe it! In other words, do a fresh install of the OS and the SQL Server.

    😎

  • RE: Find rows where value changes from positive to negative & v.v.

    Mark Cowne (4/22/2015)


    Assuming weeknumber is contiguous you can do this

    SELECT a.WeekNr,a.Data

    FROM mytable a

    WHERE EXISTS(SELECT * FROM mytable b

    ...

  • RE: Need to stack/transpose one row w/3 fields to a single column

    latingntlman (4/29/2015)


    Hello, the subject pretty much says it all. I have the following result set but I want to stack or transpose the 3 fields into a single column. I...

  • RE: import damaged SQL MDF file

    WilliamPhill (4/29/2015)


    I have a PC that had sql 2005 running on it that has died. The OS is corrupt and wont boot / repair at all.

    I have managed to get...

  • RE: Today's Random Word!

    Ed Wagner (4/29/2015)


    Space

    Distance

Viewing 15 posts - 5,461 through 5,475 (of 8,761 total)