Forum Replies Created

Viewing 15 posts - 196 through 210 (of 2,894 total)

  • RE: result in text file?

    SET @bcpCommand = 'bcp "SELECT * FROM #Results" queryout "' + @FileName + '" -T -c -t,'

    ...

    _____________________________________________
    "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: Adding Missing data for one person

    If you would follow the instructions found under the link at the bottom of my signature, the answer could be more detailed...

    Otherwise:

    drive your select query from a set of 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: I need to deduplicate a 800 million row table (100 million rows have duplicates)

    Luis Cazares (2/6/2014)


    With 800M rows, I would use a bulk export/import for this. I see 2 options:

    Use bcp to export query with a SELECT DISTINCT (or GROUP BY all columns),...

    _____________________________________________
    "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: Number of Records Affected

    Actually, it is not very clear of what OP want's and what he is talking about.

    I cannot see how SQL script/proc can ask user to confirm for proceeding with...

    _____________________________________________
    "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: Number of Records Affected

    BWFC (2/6/2014)


    jayoub (2/6/2014)


    I would like to know how to run an update or delete query and have a chance to commit or not. Here is the issue. When...

    _____________________________________________
    "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: I need to deduplicate a 800 million row table (100 million rows have duplicates)

    Whatever way you do, it's not going to be super fast.

    You may want to try

    SELECT DISTINCT * INTO NewTable FROM ExistingTable

    DROP TABLE ExistingTable

    EXEC sp_rename 'NewTable' , 'ExistingTable'

    _____________________________________________
    "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: Number of Records Affected

    BEGIN TRAN

    DELETE [tablename]

    WHERE [some contitions]

    IF @@ROWCOUNT < 10

    COMMIT TRAN

    ELSE

    ROLLBACK TRAN

    _____________________________________________
    "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: Number of times a function is accessed.

    ben.brugman (2/6/2014)


    Eugene Elutin (2/6/2014)


    If you want to see how many times any sql executed with calling this functions, Gail's suggestion with profile might help.

    But it has nothing to do...

    _____________________________________________
    "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: Number of times a function is accessed.

    If you want to see how many times any sql executed with calling this functions, Gail's suggestion with profile might help.

    But it has nothing to do with "how many...

    _____________________________________________
    "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: Number of times a function is accessed.

    Is it function or stored procedure? If you are talking about function, have you tried to "build in counter ". I just wonder how are you going to do so,...

    _____________________________________________
    "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: Index with a column varchar(50)

    Lowell (2/6/2014)


    the usual answer is it depends on how you are searching;

    if you are searching on last name (WHERE LName = 'McArther')

    then yes, an index would help a query like...

    _____________________________________________
    "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: Usage of Temprory Table in Stored Procedure

    Any additonal line of code (excluding comments) degrades the performance less or more...

    There is nothing wrong with using temp tables.

    Using static...

    _____________________________________________
    "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: Index with a column varchar(50)

    It depends...

    _____________________________________________
    "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: List DB users

    I am not sure that you can query Active Directory to list SQL Server permissions :unsure:

    You cannot...

    I am looking to query each Database in our environment and list AD,...

    _____________________________________________
    "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: How to make a function a system function.

    Lowell (2/6/2014)


    i actually make things system functions , system procedures, and stuff quite a bit i have a ton of developer tools i've created and adapted that go in master.

    Could...

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