Forum Replies Created

Viewing 15 posts - 3,046 through 3,060 (of 3,957 total)

  • RE: Intresting Query

    Eugene Elutin (8/10/2012)


    dwain.c (8/10/2012)


    Eugene Elutin (8/10/2012)


    You should try CLR too...

    Hah! I was waiting to hear someone suggest that. Not surprised it was you.

    Where have you been lately Eugene?...

  • RE: Intresting Query

    Eugene Elutin (8/10/2012)


    You should try CLR too...

    Hah! I was waiting to hear someone suggest that. Not surprised it was you.

    Where have you been lately Eugene? Haven't seen...

  • RE: Intresting Query

    Strange. I was getting quite inconsistent results.

    Curious how my terse version compares to yours on your machine in terms of consistency (the test harness doesn't use that).

    The point though...

  • RE: Intresting Query

    Eugene Elutin (8/10/2012)


    If take it a bit more serious, you better to be careful...

    The given definition of the table has Column(varchar(20). Is any guarantee that the values there will...

  • RE: Precedence of operator in SQL

    Phil Parkin (8/10/2012)


    Eugene Elutin (8/10/2012)


    SQL does exactly what should be done in mathematics:

    5 - 2 + 3 = 5 + (-2) + 3

    Now you can see that it's...

  • RE: Escape in sql server 2000

    select * from table name where column like '%N%' escape'\'

    I suggest removing escape '\' because the only reason you'd need it is to indicate that % should be interpreted literally...

  • RE: Intresting Query

    Eugene Elutin (8/10/2012)


    And if the BIGINT is not big enough for you, use DECIMAL(38)

    It can handle numbers upto:

    99,999,999,999,999,999,999,999,999,999,999,999,999

    🙂

    Curious what that would do to the performance, but I'll let...

  • RE: Precedence of operator in SQL

    Ah... So you weren't trying to say that, which is what I suspected. 🙂

    There's always been a controversy over that acronym: http://www.allvoices.com/contributed-news/6036567-bodmas-is-used-my-millions-at-school-is-it-correct

    Quoting that article:

    Now if one uses BODMAS on 5...

  • RE: Precedence of operator in SQL

    Are you trying to say that Division has precedence over Multiplication and Addition over Subtraction?

  • RE: Precedence of operator in SQL

    derek.colley (8/10/2012)


    Should follow BODMAS, i.e. Boolean, Division, Multiplication, Addition, Subtraction.

    BOL has division/multiplication at level 2 while addition/subtraction are at level 3.

    http://msdn.microsoft.com/en-us/library/ms190276.aspx

  • RE: Creation of dynamic sql query to create a select statement to pick a unique record

    Personally, I'd like to see the Dynamic SQL version posted before we go jumping to hasty conclusions or generalizations like "too many iterations" or "would make it very hard for...

  • RE: Intresting Query

    derek.colley (8/10/2012)


    REVERSE(1*REVERSE([Column] * 1))

    Dwain - elegant but doesn't work for larger values. Example:

    DECLARE @foo VARCHAR(20)

    SET @foo = '00002432002000'

    SET @foo = REVERSE(1*REVERSE(@foo * 1))

    PRINT @foo

    Output:

    Msg 248, Level 16, State 1,...

  • RE: Intresting Query

    I also played around with your test harness to ensure there were some leading and trailing 0s.

    SET NOCOUNT ON;

    IF object_id('tempdb..#sampleData') IS NOT NULL

    BEGIN

    DROP TABLE #sampleData;

    END;

    ...

  • RE: Intresting Query

    Interesting query, interesting test results.

    Cadavre - Try changing your @Holder as follows:

    DECLARE @HOLDER VARCHAR(20);

    What do the results say then?

    Of course its easy being a critic. 🙂

  • RE: What are Objective Business Reasons to Prefer SQL Server 2012 over 2008 R2?

    IMHO. The main reason to choose SQL Server 2012 is so that you'll obtain the longest support coverage from MS for the platform.

    Personally, I prefer to wait for SP1...

Viewing 15 posts - 3,046 through 3,060 (of 3,957 total)