Forum Replies Created

Viewing 15 posts - 511 through 525 (of 812 total)

  • RE: Convert string Hex to Numeric with inline TSQL

    Federico Iori (8/8/2012)


    A faster way to convert Hex to Dec is

    select CAST(CONVERT(VARBINARY, 'FF00FF', 2) AS INT)

    The string to convert must be at least 2 chars long :

    select CAST(CONVERT(VARBINARY,...

  • RE: Ghost Cleanup

    Interesting!

    Thanks!

    🙂

  • RE: Precedence in math

    What type of White it is? Pure White or Cream.. or Grayish....

    It depends: before or after the ride.

  • RE: Precedence in math

    Unbelievable, 98% of right answers! I think it's the record on ssc.

    Next, I will submit the following question:

    What color was the Napoleon's WHITE horse?

    😛

  • RE: Script to replace 5 consecutive digits with special character

    Your script replace 5 consecutive digits with 2 stars.

    Here an optimized version.

    declare @substr varchar(50)--substring of input string in while loop

    declare @index int--index of number in the substring

    set @substr...

  • RE: SQL JOINS

    Koen Verbeeck (1/8/2013)


    Not sure what this question tries to teach us.

    I spend 5 minutes looking for a mistake, only to finally decide there wasn't one, all joins seemed legit. I...

  • RE: Coalesce and Conversion

    I prefer ISNULL, the cast is done to the first argument.

    I use it e.g. with numeric type ISNULL(int_null,0). But, I should remember that with string ISNULL may be dangerous as...

  • RE: T-SQL

    okbangas (1/4/2013)


    Let me quote myself, NULL is treated just like any other value in a unique constraint. It is the combination of values that has to be unique. It is...

  • RE: Finding New Years Eve

    Steve Jones - SSC Editor (1/1/2013)


    Parens corrected, and my apologies. I changed to question to exclude Jan 31, this that doesn't work.

    Happy New Year.

    I'll award back points tomorrow.

    Hi Steve and...

  • RE: TSQL 2012 #1

    Koen Verbeeck (12/27/2012)


    Nice question about a new feature, but your explanation could have mentioned the FOR BROWSE option. After all, that's what the question is about 🙂

    +1

  • RE: Divide by zero

    Toreador (12/24/2012)


    That required rather more brain cells than I was expecting to need on Christmas Eve :hehe:

    Glad to see that option 5 really should be correct, I'd started to think...

  • RE: Aggregates in T-SQL

    Koen Verbeeck (12/20/2012)


    Easy question. I didn't even had to check to 3rd query, because the second one gave (NULL,0) and there was only one answer in the list with that...

  • RE: Renaming a procedure

    Hugo Kornelis (12/12/2012)


    As happens more often with a Question of the Day: Good idea, but badly executed.

    If you exactly follow the instructions, executing the 'alter proc' script after making the...

  • RE: SQL

    OK, I get it wrong, but I understood that the author does not know the "ON CASCADE" options.

  • RE: Queries

    The profiler shows Read 0

    This is the most wrong and useless qotd in the history of ssc.

Viewing 15 posts - 511 through 525 (of 812 total)