Forum Replies Created

Viewing 15 posts - 4,036 through 4,050 (of 7,484 total)

  • RE: how to add data to two table

    Are you trying to add two columns to one table and one table to another table?

    If so you wnat code like

    ALTER Table1 add ColA type1 columnConstraints1, ColB type2 columnConstraints2;

    ALTER...

  • RE: Explicit Transaction to improve performance?

    Jeff Moden (10/12/2012)


    Mahesh Bote (10/12/2012)


    [font="Verdana"]Hi All,

    I have one Stored Procedure which frequently gets executed. Though it is a straight forward Stored Procedure with one select statement and one delete statement,...

  • RE: TSQL to join two tables to calculate the total based on the date range

    Luis Cazares (10/16/2012)


    This might work, but an index might help even more (if you don't have one). I won't give my advice on the index because I'm learning as well...

  • RE: split column pipe delimited

    Cadavre (10/16/2012)


    Lowell (10/16/2012)


    ok, adding WITH SCHEMABINDING to my scalar function cuts half a second off of my performance, so it goes to 7.5 seconds or so instead of over 8...

  • RE: Would a smaller number of VLFs in the log speed up the redo phase of recovery of a mirror snapshot?

    Marios Philippopoulos (10/16/2012)


    Perry Whittle (10/16/2012)


    Marios Philippopoulos (10/16/2012)


    I will probably not do that, as it seems a bit too much voodoo to me... 🙂

    Whats voodoo about creating a table, inserting...

  • RE: Noise

    Rich Weissler (10/16/2012)


    okbangas (10/16/2012)


    If it were different in two supported editions of SQL Server, I agree. However, SQL Server 2005 is not supported anymore, so this question is correct for...

  • RE: Char And int

    mister.magoo (10/15/2012)


    Jan Van der Eecken (10/15/2012)


    Nice one, Tom! But does the TRY_CONVERT() make the query non-sargeable? Guess it would?

    Yes it does...

    Type conversion in expression (TRY_CAST([test].[field1] AS smallint)) may affect ...

  • RE: Char And int

    L' Eomot Inversé (10/14/2012)


    I think it would be improved by LTRIM

    SELECT * FROM Test WHERE RIGHT('0000'+LTRIM(field_one),5) BETWEEN '00001' AND '00009'

    That's still not going to work - a string like...

  • RE: select rows where values appear consecutively

    CELKO (10/14/2012)


    Then try this query. The CTE can be changed quickly to other report periods. I like this because MIN() and MAX() can be optimized into the GROUP BY

    WITH Year_Pairs...

  • RE: Transactions

    deleted

  • RE: VIEW - 9

    Fun question.

    I wonder how many people will fail to notice that although you've got everything ready to create the index you haven't actually done so, so the view is not...

  • RE: T SQL Help - Comma separated numric value

    ChrisM@home (10/14/2012)


    Fair point, Tom, but if you examine all of those "output example" figures and count the number of digits between the comma and the decimal point, this is what...

  • RE: Patent Stupidity

    The whole computer industry has been badly damaged by patents granted on pure mathematics in the USA, which have severely damaged the development of secure encryption. The Onion story...

  • RE: help with difficult situation

    It strikes me that maybe everyone who has answered so far has been trying to return the records not wanted, rather than the records wanted. So perhaps something like

    select...

  • RE: Char And int

    ChrisM@home (10/14/2012)


    ....

    SELECT * FROM Test WHERE RIGHT('0000'+field_one,5) BETWEEN '00001' AND '00009'

    This only works if there are no leading spaces. Leading zeroes are OK, and string comparison ignores trailing...

Viewing 15 posts - 4,036 through 4,050 (of 7,484 total)