Forum Replies Created

Viewing 15 posts - 5,476 through 5,490 (of 13,460 total)

  • RE: All Server DDL Triggers

    i just tested this on my dev server;

    i'm just printing some of the data available, which you would do as an email, or logging to an audit table;

    you can rollback...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Need to move 65GB of data to an archive database

    I would say you want to take the "how do you eat an elephant" approach: one bite at a time.

    1. Make sure the destination database is set to SIMPLE recovery...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Missing Index Information DMV.

    PradeepVallabh (5/21/2012)


    I am pretty new to resolving query performance issues, just bear with me...Why should i create an index with Include Columns(why can't i just say create a composite index...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Why does my SELECT query only return results with "TOP XX" in front of it?

    because you are putting a function on thee column, SQL has to convert the WHOLE table to give you results.

    with a TOP, it can shortcut and convert fewer values...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: SCOPE_IDENTITY()

    Yeah i thought something looked wrong, when he said it's returning 4 values;

    ii had to double check myself and test scope identity to prove it returns one and only one...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: General Qestions

    Eugene Elutin (5/21/2012)


    ... We handle upto 200 yottabytes of data per hour....

    had to look that one up! Thanks Eugene!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: Permission denied on the object sp_send_dbmail (but, not what you think)

    since it's just this one server,

    could it be something like database mail is not emabled, even though you've created the profile?

    it sounds like maybe you scripted the database mail settings...

    • This reply was modified 7 years, 3 months ago by Lowell.
    • This reply was modified 6 years, 10 months ago by Lowell.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: difference between last(max) and penultimate(max-1) for each group

    that would work or not work depending on the data, right vinu?

    if the data elements are consecutive numbers, but if they are not, i don't think you get the right...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Importing Multiple csv files into one SQL Table

    MysteryJimbo (5/18/2012)


    *cringe*

    Sorry. I've seen xp_cmdshell and similar methods like that before. Oooo and a cursor. 🙂

    awe come on; whether SSIS or anything else, multiple files requires a...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Importing Multiple csv files into one SQL Table

    I'll go all devils advocate on the SSIS guys and present a solution i put together for other posts that is all TSQL.

    Thsi requires xp_cmdshell to get the list of...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Create view on CDC to display only the changes but not the change for latest values in the table.

    couldn't you just add row_number to the results with the PARTITON BY and with DESC, then wrap it to exclude the "first" row (the last change?)

    something like this?

    (untested:)

    SELECT * FROM...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Help with sp_help ( HOw do you capture the output to a table )

    right along the lines of what opc.three was suggesting, you could look at the code behind the scenes of sp_help and do something with it.

    on my shared hosted server i...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: subqueries

    looks like a sum of case statements to me:

    you have to group by the patient,and then selectively sum the charges based on the Department(code?)

    something like this, i would think:

    SELECT...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: difference between last(max) and penultimate(max-1) for each group

    add a rownumber() :

    ie:

    ROW_NUMBER() OVER (PARTITION BY [The text Column] ORDER BY [The text Column] ,[TheNumeric Column] ) As RW

    with that, you could join the data against itself with...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Testing Enterprise Backups

    MysteryJimbo (5/15/2012)


    IMHO if its not restored on SQL Server, it hasnt been tested. If a restore fails, no manager in any company will accept the excuse "well it worked...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 5,476 through 5,490 (of 13,460 total)