Forum Replies Created

Viewing 15 posts - 46 through 60 (of 141 total)

  • RE: Using CASE on a Pivot?

    select UPPER(tc.FName + ' ' + tc.LName) AS Coun,

    SUM(CASE WHEN Expensetype = [Accommodation] THEN ISNULL(Expense,0) ELSE 0 END) Accommodation,

    SUM(CASE WHEN Expensetype = [Flights] THEN ISNULL(Expense,0) ELSE 0...

  • RE: Stored Proc results into XML

    Thank you

    I will try this out.

  • RE: Make a column immutable, once set it sticks

    Point taken. If the checksum val was automatically put in a column - it would be a computed column.

  • RE: Make a column immutable, once set it sticks

    Thank you v.much Eric

    That is a good idea, it is simple to understand. I went for the permissions in the end.

    All new data is protected. I can still login...

  • RE: SQL Server on Virtual servers

    Thanks for replying Perry.

    I have no idea how it is configured as Virtual server e.g. on the physical machine.

    From user of the virtual machine it appears at 2 disks, one...

  • RE: Make a column immutable, once set it sticks

    djj

    Thanks for the idea. I tried and tested the trigger that was my fall-back scenario.

    Taking your idea of permissions. I added users to a role and denied update permission on...

  • RE: Make a column immutable, once set it sticks

    Thanks Scott

    I've tested the app and the trigger works ok all edits are completed. The app stops these fields being edited anyway. The trigger has stopped these fields being updated...

  • RE: Make a column immutable, once set it sticks

    Thanks for your reply

    update tblcustomer

    set Supid = Supid

    I don't mind if this fails.

    As long as the supid and manid are not part of the SET clause of an update I...

  • RE: Order of predicates

    Thank you Luis

    I didn't know of the isnumeric issue, I made the same wrong assumption as your link says most people make.

    I treat it as declarative but was surprised...

  • RE: Copy varchar(max) fields slow

    Jeff,

    My fault I was doing

    use ArchiveDB

    GO

    DELETE FROM LiveDB.dbo.tblCust

    WHERE EXISTS (

    SELECT TOP (100000) tArchive.CustID FROM dbo.a_tblCust as tArchive

    WHERE LiveDB.dbo.tblCust.custID = tArchive.custID

    )

    This worked correctly

    DELETE TOP (100000) LiveDB.dbo.tblCust

    FROM a_tblCust as tArchive

    WHERE ...

  • RE: Copy varchar(max) fields slow

    Jeff

    I set the archive DB to be 5GB to start off with, it doesn't grow, it's tran log to 1 GB it also does not need to grow.

    The Live DB...

  • RE: Copy varchar(max) fields slow

    Thanks for replying.

    I size the Archive DB to 5GB to start with and give it a large tran log.

    I notice even though I'm doing it in batches;

    1. The tran log...

  • RE: Copy varchar(max) fields slow

    Sorry I forgot, total data movement is about 5GB 90% of this 5GB are 2 tables with the varchar(max) columns.

    It takes about >95% of the time to move this data,...

  • RE: Copy varchar(max) fields slow

    Hi Sean thanks for replying.

    It's an express edition that is getting close to it's individual DB size limit. The varchar(max) field mostly contain data and char len > 15,000 is...

  • RE: Table size after a reindex

    Fill Factor is applied only during rebuild, not when insert/delete occur.

    Thank you that explains it then. Although I only measured size before and after. It must be heavily fragmented.

    From...

Viewing 15 posts - 46 through 60 (of 141 total)