Forum Replies Created

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

  • RE: Are Triggers a "legacy" Feature? (Database Weekly, Nov 08 2008)

    I mainly use triggers to modify the behavior of third-party db and to alert users by e-mail that some value has been set. e.g. changing terms of payment is permitted,...

  • RE: The Lonely and Neglected Cartesian Product (Cross Join)

    This case is simpler: NO CROSS JOIN NEEDED.

    Get result in text format:

    create table #temp1(PK int IDENTITY Primary Key, column1 varchar(20))

    insert into #temp1 values ('employee 1')

    insert into #temp1 values ('employee 2')

    insert...

  • RE: Tables and rows listing

    Boh! Out of the context this script is useless!

    Use of cursor is terrible.

  • RE: Basic maths - operator precedence

    Hugo Kornelis (2/6/2013)


    Dineshbabu (2/6/2013)


    But you steal some of my time by making me to sit and calculate each and every statement..:-) .

    You could have saved that time. I just checked...

  • RE: CHOOSE - 1

    I know how CHOOSE works, but I do not want to know what the default data are for the table Employ!

    Let's go!

  • RE: CHOOSE - 1

    raulggonzalez (1/28/2013)


    I don't see what this QotD is trying to test... It's not about how CHOOSE works but what data you have in a table that is not represented on...

  • 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 = '1234567890abc89900123456abcde'

    while...

  • 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...

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