Forum Replies Created

Viewing 15 posts - 301 through 315 (of 557 total)

  • RE: Using convert function in create table statement

    Examples of a computed column in a table.

    Source for the computed column in this case is varchar or datetime.

    In excel time and/or date is just presented as the number of...

  • RE: Copying a complete database.

    joeroshan (12/8/2015)


    You can create a generic script but you might need a lot of work in that direction.

    I normally start with import / export wizard or SSIS packages.

    Using the Copy...

  • RE: Copying a complete database.

    John Mitchell-245523 (12/8/2015)

    Timestamp is deprecated

    Thanks, I will not put an efford in this then. I'll solve this when I encounter them, without generating code for this. (Timestamps are rare...

  • RE: Use of SP_

    JustMarie (12/1/2015)


    Why not use _sp as a suffix? It still shows that the code is a stored procedure and lets you group things by name much more easily.

    I've advocated...

  • RE: Date Difference

    DECLARE @olddate datetime = '20141124 19:50'

    SELECT

    convert(float,GETDATE()-@olddate) ...

  • RE: Triggers on Views.

    Jack Corbett (11/10/2015)


    Doesn't this defeat the purpose of having a trigger to track changes? If I were an auditor I'd certainly question the validity of the change...

  • RE: Triggers on Views.

    Thank you Jack and Gail,

    Jack Corbett (11/9/2015)


    I'm not sure why you need to rename the existing table in order to create the history table. I'd just leave...

  • RE: Triggers on Views.

    I am preparing a script to test the above.

    Problem 1:

    If a default is defined in a table, and insert is done on the View, where the trigger uses the 'INSERTED'...

  • RE: Tools to Search Database for Values

    anthony.green (11/3/2015)


    Or you could try this aswell

    http://www.sqlservercentral.com/scripts/T-SQL/69207/

    The refereced site gives a compact search 'tool'.

    I got some errors and have made some changes to the code.

    Now: Searches are only done on...

  • RE: Tools to Search Database for Values

    Hello,

    In the past I created a number of search routines.

    This was quite a jumble in different styles.

    Now I have bundled the search routines in a stored procedure and the master...

  • RE: Index and Optimiser question.

    ChrisM@Work (11/2/2015)

    Can you share a couple of your queries (obfuscated, of course)?

    Sorry at the moment I do not see a feasible way to do this within a limited amount of...

  • RE: Index and Optimiser question.

    Just did a checkup on the tables which inspired this thread.

    The actual number of columns in the 'covering index' was 10. And yes they are all used in the actual...

  • RE: Index and Optimiser question.

    GilaMonster (11/1/2015)

    Columns included are in the leaf level only, not the key, so the index is smaller than if they were in the key.

    They also don't count towards the 900...

  • RE: Shocked. (A Halloween Horror story.)

    Jeff Moden (10/31/2015)


    To be honest, I'd say the quote about "half full" is incorrect, at least about the implementation for Microsoft's interpretation of the Rushmore Engine (the basis of SQL...

  • RE: Index and Optimiser question.

    Alexander Suprun (10/30/2015)There is only one way to force optimizer to do want we want, but we have to use table twice in our query, which becomes cumbersome and not...

Viewing 15 posts - 301 through 315 (of 557 total)