Forum Replies Created

Viewing 15 posts - 1,396 through 1,410 (of 2,894 total)

  • RE: whether commited transaction will get rollback again

    Mike John (6/27/2012)


    Once committed it is committed.

    ...

    Not for nested transactions, check this one:

    begin transaction outerOne

    update Table1 set Col1 = 'booo' where id =1

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: sp_MsForEachDb with variable

    Don't be surprised if some databases, sometimes will be missed by sp_MsForEachDb...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Insert data into single table from multiple tables

    zineb (6/23/2012)


    Hi,

    I need your help on a similar case

    ...

    Please open the new thread!

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Getting Duplicates

    With over 500 points I guess you do know...

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Availability calculation - a nice T-SQL problem

    There is another way with using quirky update instead of cte with two window functions.

    select *, CAST(FreeCount AS BIT) avail, cast(null as int) grp

    into #ba

    from @booking b

    order by Id

    create unique...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: which @@datefirst is effective for a default constraint ?

    Jizzy Wig (6/25/2012)


    will this use the @@datefirst of the connection that inserts a record?

    constraint DF_dbo_Table_Week default (datepart(week, sysdatetime()))

    Just try yourself:

    SET DATEFIRST 1

    INSERT dbo.Table ...

    SET DATEFIRST 7

    INSERT dbo.Table ...

    and...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Avoiding dynamic SQL

    If you: sp_helptext sp_msforeachdb and sp_helptext sp_MSforeach_worker, you will see when and why database can be missed out...

    Both "foreach" undocumented procs are based on global cursors, therefore using them you...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Trying to Find the Right Font

    Why not to use some of "Wingdings", it will add some security to your code.

    Oops, it's not allowed... :hehe:

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: IN vs Exists

    FunkyDexter (6/21/2012)


    Well, that's a query within a query... so I'd call it a sub-query.

    The point I was making making was that you couldn't do something like:-

    Select * From...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: convert from MM/DD/YYYY to YYYYMMDD

    adolf garlic-411709 (6/19/2012)


    This is standard practice in date dimensions in a data warehouse, having a timekey of YYYYMMDD (int)

    It is not!

    This is not a STANDARD practice - it is...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Compute column

    That is bad one. Triangular-joins are performance killers in this case.

    My advice is to read the article pointed in the first reply.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Avoiding dynamic SQL

    :setvar only works in SQL command mode.

    I cannot understand why would you need dynamic sql for statements there.

    Why not to have the same stored procedures in every database and call...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: IN vs Exists

    FunkyDexter (6/21/2012)

    ...

    1. A exists doesn't work across a fixed list of values, only across a genuine sub query

    ...

    Hmm, it depends what you call "a genuine" sub query (in...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Is there some bug?

    Thomas Stringer (6/17/2012)


    CELKO (6/17/2012)


    Why use all this code to fake arrays or magnetic tapes? Just write five UPDATE STATISTICS commands and run the script.

    The OP wants to update stats on...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Need SQL Query

    You will need to start from here:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 1,396 through 1,410 (of 2,894 total)