Forum Replies Created

Viewing 15 posts - 166 through 180 (of 812 total)

  • RE: Updating a View with CHECK

    The correct answer is "Depends", if the view returns or not a row:

    No row returned: -> The row is not updated and no error is returned.

    Row returned: -> No update...

  • RE: Small rounding

    That's true!

    SELECT ROUND(0.7 , 0) as a into #a

    Here, the table created:

    CREATE TABLE dbo.#a1

    (

    a numeric(1,1) NOT NULL

    )

  • RE: AT TIME ZONE

    Interesting, thanks!

    But, how do I convert it in previous release of sqlserver?

  • RE: Will It Compress?

    "we attempt to compress the table using this statement: sp_estimate_data_compression_savings ..." is wrong because the sp "sp_estimate_data_compression_savings" just is an "estimate" and it doesn't compress anything!

  • RE: Will It Compress?

    SPARSE is not a datatype but a property.

    So, the correct answer is wrong!

    SELECT * FROM sys.types

    WHERE is_user_defined='0'

  • RE: SQL 2012: Dirty pages flushed in a single write

    Nakul Vachhrajani (8/9/2016)


    Thank-you for the question! Made me revisit the documentation and refresh the concepts (Good!)

    +1

  • RE: Lots of inserts? Part I

    I prefer to use "SET IMPLICIT_TRANSACTIONS ON"

    Only one transaction on first I/O and one commit.

    SET IMPLICIT_TRANSACTIONS ON

    INSERT INTO tbl VALUES

    ( REPLICATE('a',5000) )

    GO 100

    COMMIT

    GO

    print @@trancount

  • RE: Lots of inserts? Part I

    Waiting for commiting all transactions, in reality, the table is empty for the other connections.

  • RE: How does SQL work with blanks?

    TomThomson (7/26/2016)


    Interesting question, but rather badly put together - it could have been a good question if it had simply included a statement saying that the four statements are executed...

  • RE: How does SQL work with blanks?

    philip.cullingworth (7/26/2016)


    Therefore, as with all variable length character fields, trailing spaces are ignored.

    Philip

    That's not true!

    Trailing spaces are stored also in nvarchar e varchar datatype.

    Compare and len function ignore trailing spaces.

  • RE: How does SQL work with blanks?

    It's not a bug and nor a feature.

    The first database is stored in sys.databases with double blank.

    As you know, the compare condition and len function don't matter of trailing spaces.

    So,...

  • RE: A DBCC Copy

    The answer is in the title.

  • RE: Data Conversion Transformation

    I found this:

    https://msdn.microsoft.com/en-us/library/ms141679.aspx

    From BOL:

    Truncations. A truncation is less serious than an error. A truncation generates results that might be usable or even desirable. You can elect to treat truncations as...

  • RE: Delayed Durability

    Very, but very interesting!

    Thanks.

    🙂

  • RE: sp_executesql

    The second option is useless, but it also is correct.

    SELECT @p = N'@m varchar(200)="event message", @d datetime=getdate(), @U varchar(10)="Steve" '

    I.e. this code returns 1 despite @p is initialized...

Viewing 15 posts - 166 through 180 (of 812 total)