Forum Replies Created

Viewing 15 posts - 2,701 through 2,715 (of 2,894 total)

  • RE: DROP DATABASE

    I guess the next challenge would be to create the sp for users to formatt hard drive or/and re-install Windows and SQLServer. 😀

    You have quite demanding users, man!

    _____________________________________________
    "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: Looking for best practices for ensuring a unique value on the many side of a a one-to-many relationship

    Joe Celko (6/23/2010)


    ...

    1.Rows are not records.

    2.SQL programmers do not use BIT flags; that was assembly language and punch cards.

    3.Being a primary address of a person is a relationship 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: INSERT INTO SELECT WITH ORDER BY

    Joe Celko (6/23/2010)


    ...

    This is one of many reasons that good SQL programmers never use the IDENTITY property (it is not really a column at all).

    ...

    Of cause!

    Only very bad SQL...

    _____________________________________________
    "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: DROP DATABASE

    Users to drop databases? Why only in test environment?

    That is the coolest idea I ever heard of!

    😀

    _____________________________________________
    "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: Query Help

    ssc_san (6/23/2010)


    ...

    I need to get the count of codes(bc, cd, de) where the codes(ab) status(close)

    ...

    That query does exactly what you have asked for:

    SELECT codes, count(*)

    FROM ABC

    WHERE codes in ('bc', 'cd',...

    _____________________________________________
    "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: Funtion to calculate turn arround time time between two dates

    pitso.maceke (6/23/2010)


    ...

    I just have a problem with your code. When I try dates that includes weekends, I got this message:

    (Start Saturday 12H00 and End Monday 09H00)

    ...

    First of all you have...

    _____________________________________________
    "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: Records per hour within a time span

    From, what I can see, the query I gave you does not return running totals but retuns the count of loggins for each hour for period of time during the...

    _____________________________________________
    "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 INTO SELECT WITH ORDER BY

    Gail,

    I've run test more than 5 times (and I did few concurrent queries as well). Please believe me I've tried the best (on my machine and on aour dev server)....

    _____________________________________________
    "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: Help with bulk random code insert

    If you don't care about duplicates and not all letters from A to Z to be used, you can use the following:

    INSERT INTO tblExample(fname,sname,email,code)

    SELECT fname,sname,email,

    LEFT(REPLACE(CAST(NEWID() AS VARCHAR(150)), '-',''),8) AS...

    _____________________________________________
    "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: Data integration/Data transfer

    sql_novice_2007 (6/21/2010)


    ...

    Is there any other way than receiving the data in an excel/csv/txt file/xml file or API calls?

    ...

    A lot of other ways:

    1. By phone (some one calls you and dictates...

    _____________________________________________
    "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: Looking for best practices for ensuring a unique value on the many side of a a one-to-many relationship

    You could add PrimaryAddressId column into your Person's table, that would ensure the person has only one primary address.

    _____________________________________________
    "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 INTO SELECT WITH ORDER BY

    Attmept to set max memory to its minimum value of 16Mb caused SQL to stop executing any query on midium sized tables :w00t:.

    Increased the max memory allotment to 32Mb, made...

    _____________________________________________
    "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 INTO SELECT WITH ORDER BY

    Dave Ballantyne (6/22/2010)


    Eugene Elutin (6/22/2010)

    Let's try it together, I really want to find the example where it is possible

    Why (other than curiosity ) ? It seems a lot simpler to...

    _____________________________________________
    "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 INTO SELECT WITH ORDER BY

    Thank You, Gail.

    It almost there. The reason of getting data not in order is using TABLOCK hint.

    But now I have another question, when would SQL Server place a TABLOCK 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: INSERT INTO SELECT WITH ORDER BY

    Dave and Gail,

    I do totally agree with you on use of "ORDER BY" to ensure the order. Sorry, of cause data is stored logicaly and retrieved in the logical order.

    However,

    I...

    _____________________________________________
    "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 - 2,701 through 2,715 (of 2,894 total)