Forum Replies Created

Viewing 15 posts - 1 through 15 (of 28 total)

  • RE: How does SQL work with blanks?

    As I remember, table names are stored as a sysname column, and looking at the Technet page for special data types https://technet.microsoft.com/en-us/library/ms191240(v=sql.105).aspx it states

    sysname is functionally the same as...

  • RE: Converting Questionable Dates

    I may have misunderstood, but the Explanation states

    If the input value cannot be converted to the resulting type, then an error is returned.

    Looking at the MSDN article, it says

    Returns a...

  • RE: Happy Monday

    I'm confused.

    In the question we have the following 2 lines

    SELECT @sDayName = LEFT(UPPER(LTRIM(RTRIM(@sDayName))),3)

    , @dtFirstOfMonth = CONVERT (SMALLDATETIME

    ...

  • RE: Declare @local variable

    Mr. Kapsicum (12/4/2013)


    easy one for the guys who has past experience in 2005 😀

    And those with current experience of 2005:-)

  • RE: LEN and CONVERT

    PHYData,

    I'm not sure I understand what you are trying to say with this code, but let's go through it select by select

    SELECT LEN('123456789101118.12345'), DATALENGTH('123456789101118.12345') ,'123456789101118.12345'This is showing that...

  • RE: LEN and CONVERT

    PHYData DBA (8/1/2013)

    Phillip would you mind posting a link to the article your quote comes from? I not trying to say anyone is right or wrong. I am...

  • RE: LEN and CONVERT

    PHYData DBA (8/1/2013)


    Hugo Kornelis (8/1/2013)SELECT LEN(@var) implicitly converts @var to string, because that's the only data type supported for LEN. This conversion is independent of the clients' Windows locale setting,...

  • RE: LEN and CONVERT

    john.arnott (7/31/2013)


    L' Eomot Inversé (7/30/2013)


    ...... The question is about the lengths of the strings to which the numeric values are implicitly converted, since the length operator used is...

  • RE: LEN and CONVERT

    thierry.vandurme (7/30/2013)


    sorry if I find the outcome not as trivial as some of you do :blush:

    I don't understand the result for select 1. The money data type has a scale...

  • RE: LEN and CONVERT

    I think that the answer has missed a point in not mentioning that the default precision of a decimal variable is decimal(18,0). It's the fact that there is no...

  • RE: LIKE a vowel

    For interest, I thought I'd have a bit more of a look at which options displayed this effect, what caused Æ and æ to be returned.

    It appears on our server...

  • RE: COALESCE

    Lokesh,

    Thanks for correcting my mistake. What comes of trying to write a response before the coffee has kicked in.

    Philip

  • RE: COALESCE

    To me this feels more like a trick question than a question about coalesce. The trick was to notice that 'NULL' was quoted and not the NULL value. ...

  • RE: FILTER

    Raghu,

    The results you are getting are due to you only specifying the collation on the where clause.

    The query is selecting rows 1, 3 and 6 since they are the rows...

  • RE: Sorting triggered by data type

    I think that the explaination is actually slightly wrong.

    ORDER BY

    (CASE WHEN c.IsInsuranceLength=1 THEN CONVERT(INT, cc.Value )

    ELSE cc.Value

    ...

Viewing 15 posts - 1 through 15 (of 28 total)