Forum Replies Created

Viewing 15 posts - 256 through 270 (of 821 total)

  • RE: Pounds of Formatting Fun

    With ZEROS:

    SELECT FORMAT(12354,'000-00-0000') AS 'SSN'

    Returns "000-01-2354"

  • RE: A Case FOR Cursors...

    The fact that Microsoft uses cursors in many sp and functions is only because that codes have been written in earlier version of SQL, starting from 4.2 in '90.

    So, except...

  • RE: Global Cursors

    Easy, I used a lot in the past, sql 4.2 to sql2000. But there isn't a real need of cursors.

    😀

  • RE: SubQuery behavior

    pmadhavapeddi22 (5/20/2015)


    Easy one

    Easy, but batches are too long.

    Query 3 and 4 differs only for the constant value.

  • RE: Stored Procedure Creation

    That's true! Stack overflow!

  • RE: COALESCE in Left Join

    Toreador (4/29/2015)


    Only 54% correct? I was expecting close to 100%!

    It depends if one has enough time to read correctly the question of th day.

  • RE: COALESCE in Left Join

    Good brain training!

    Thanks!

    😀

  • RE: CTE Problem Redux

    If in the query there are many complex expressions, I prefer to name aliases in parenthesis.

  • RE: Filtered Indexes

    edwardwill (4/22/2015)


    I copied and pasted the code into SQL Server 2014 and got this:

    Msg 156, Level 15, State 1, Line 21

    Incorrect syntax near the keyword 'OR'.

    Msg 156, Level 15, State...

  • RE: Filtered Indexes

    Good question!

    I do not like "Filtered indexes", they are too much limited. I prefer indexed view.

  • RE: NONclustered 2 clustered

    karthik babu (4/20/2015)


    Nice Question.. Index remains same irrespective of altering the table by adding a constraint and then by adding an unique clustered index.. I believe the index should have...

  • RE: Using LAG

    Hugo Kornelis (4/15/2015)


    But note that supplying an offset only produces the expected results if you can be sure that there is exactly one row per month in the sales table....

  • RE: Legal/illegal characters in table name

    Try to answer this one:

    Table Array[/url]

  • RE: Temp Table Names

    A GLOBAL temporary table has 128 characters as the limit.

  • RE: Legal/illegal characters in table name

    MyDoggieJessie (4/7/2015)


    This assumes that you have a schema in the database named "tmp" otherwise it fails because the schema does not exist.

    +1

    Ahi, ahi, ahi, ahi, ahi, ahi!!!!!!!!!!

    :w00t:

Viewing 15 posts - 256 through 270 (of 821 total)