Are the posted questions getting worse?

  • Luis Cazares - Monday, May 15, 2017 6:56 AM

    jasona.work - Monday, May 15, 2017 6:08 AM

    Hmm, I'm thinking we need an article on the performance differences of the four methods...
    Select top 1 into / truncate
    Select top 0 into
    select * into where 1 = 0
    select * into where 0 = 1
    :hehe:

    My guess is that the performance difference would be in the insert if minimal logging is available.

    My guess is that any performance difference would be drowned out by the noise.  I did run a test, and the last three methods used the same query plan on cursory review (and none of them read the source table).

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Steve Jones - SSC Editor - Monday, May 15, 2017 8:47 AM

    John Mitchell-245523 - Monday, May 15, 2017 8:44 AM

    Thanks Steve - I'll give it a try, in that case.  I assume they must therefore convert dollars to pounds at point of sale.  Having said that, it's not an actual card - it's an e-mail with a barcode on it.

    Thanks also to everybody else for your ideas!

    John

    Give it a go. Starbucks is pretty on top of IT. I was amazed when it worked, and they convert the rate that day, so works fine.

    I wouldn't have expected it to work either.  It says something about the company.

  • Is it just me or does it seem orcas are getting in on the black market organ market?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin - Tuesday, May 16, 2017 7:04 AM

    Fascinating! Thanks for sharing this, Brandie. Makes one wonder how on Earth an Orca can do anything with any precision using that big mouth and those huge teeth. (insert favourite Trump joke here)

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • David Burrows - Monday, May 15, 2017 8:24 AM

    Louis Hillebrand - Monday, May 15, 2017 7:09 AM

    Instead of adding the extra columns later :

    SELECT TOP (0) 
           *,
           [FileName] = CAST(null AS varchar(60) ),
           [FileDate] = CAST(null AS datetime )
    INTO dbo.myTable
    FROM dbo.otherTable  

    A bit limiting for filename, use varchar(max) instead and then you don't have to worry about it 😉

    Let's make sure that it can handle anything by making it nvarchar(max).

  • ChrisM@Work - Tuesday, May 16, 2017 9:15 AM

    Brandie Tarvin - Tuesday, May 16, 2017 7:04 AM

    Fascinating! Thanks for sharing this, Brandie. Makes one wonder how on Earth an Orca can do anything with any precision using that big mouth and those huge teeth. (insert favourite Trump joke here)

    Those are orcas highly trained by Muslims, Russians, and Mexicans to invade the USA. He'll build a wall all along the coast to prevent such attacks and the orcas will pay for that by working in Sea World.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares - Tuesday, May 16, 2017 10:35 AM

    Those are orcas highly trained by Muslims, Russians, and Mexicans to invade the USA. He'll build a wall all along the coast to prevent such attacks and the orcas will pay for that by working in Sea World.

    Actually, to hear him tell it, it was the fake media's idea with the Democrats taking advantage of the immigrants to plant a false flag attack.

    And now he'll ask for sea wall funding. "A great, gorgeous, beautiful sea wall that doesn't block the view of my golf courses."

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin - Tuesday, May 16, 2017 10:40 AM

    Luis Cazares - Tuesday, May 16, 2017 10:35 AM

    Those are orcas highly trained by Muslims, Russians, and Mexicans to invade the USA. He'll build a wall all along the coast to prevent such attacks and the orcas will pay for that by working in Sea World.

    Actually, to hear him tell it, it was the fake media's idea with the Democrats taking advantage of the immigrants to plant a false flag attack.

    And now he'll ask for sea wall funding. "A great, gorgeous, beautiful sea wall that doesn't block the view of my golf courses."

    And it'll have the same problem as the other wall.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    YES!

    ummmmm.... no?

    Not without a contract it can't! I mean, DIE SERVER DIE!

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Sorta technical question that is more of the curious variety.

    When you have to set up an automated email from a SQL server job to either a business unit customer or to an internal IT customer, how do you phrase the automated email part?

    We've adopted a cute-yet-weird little standard based on something one of our server guys started setting up. "This is an automated email. You will be disappointed if you reply." We then go on to list the proper response email address (and what group is watching that box / email list) if they have any question. It's not terribly professional, but it is different than what I've seen most companies send out.

    What about you?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin - Wednesday, May 17, 2017 4:47 AM

    Sorta technical question that is more of the curious variety.

    When you have to set up an automated email from a SQL server job to either a business unit customer or to an internal IT customer, how do you phrase the automated email part?

    We've adopted a cute-yet-weird little standard based on something one of our server guys started setting up. "This is an automated email. You will be disappointed if you reply." We then go on to list the proper response email address (and what group is watching that box / email list) if they have any question. It's not terribly professional, but it is different than what I've seen most companies send out.

    What about you?

    I've used something to effect of "This is an automated email from an unmonitored mailbox.  Replies will not be read." and that's it.  Depending on the recipients, I like yours because it has some personality to it and isn't strictly professional.

    On the technical side of your question, if you're using Database Mail, then you can set the reply-to address to be different than the sender address.  It's the msdb.dbo.sysmail_account.replyto_address column.

  • Yes, we could set the reply to but we don't want out of office messages and such hitting our inboxes. So we make them forward the email to us.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Ed Wagner - Wednesday, May 17, 2017 5:09 AM

    Brandie Tarvin - Wednesday, May 17, 2017 4:47 AM

    Sorta technical question that is more of the curious variety.

    When you have to set up an automated email from a SQL server job to either a business unit customer or to an internal IT customer, how do you phrase the automated email part?

    We've adopted a cute-yet-weird little standard based on something one of our server guys started setting up. "This is an automated email. You will be disappointed if you reply." We then go on to list the proper response email address (and what group is watching that box / email list) if they have any question. It's not terribly professional, but it is different than what I've seen most companies send out.

    What about you?

    I've used something to effect of "This is an automated email from an unmonitored mailbox.  Replies will not be read." and that's it.  Depending on the recipients, I like yours because it has some personality to it and isn't strictly professional.

    On the technical side of your question, if you're using Database Mail, then you can set the reply-to address to be different than the sender address.  It's the msdb.dbo.sysmail_account.replyto_address column.

    You can address the FROM any way that you want.  If you're going to direct responses to a particular group, use them for the FROM and save the user the headache..

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Brandie Tarvin - Wednesday, May 17, 2017 4:47 AM

    Sorta technical question that is more of the curious variety.

    When you have to set up an automated email from a SQL server job to either a business unit customer or to an internal IT customer, how do you phrase the automated email part?

    We've adopted a cute-yet-weird little standard based on something one of our server guys started setting up. "This is an automated email. You will be disappointed if you reply." We then go on to list the proper response email address (and what group is watching that box / email list) if they have any question. It's not terribly professional, but it is different than what I've seen most companies send out.

    What about you?

    We have a dedicated inbox for our SQL server emails (which is the reply address and has a copy of each email; mainly because i have lost count of the times people have told me "I never got dat email", when i can clearly see a copy has been sent to them). We then have a mailbox rule so that if someone then replies to that email, and at least one of our DBA's isn't included, the email is also redirected to the DBA email group. If one DBA is in the email (either To or Cc), then it'll just go to the inbox as normal (as well as any other recipients).

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Brandie Tarvin - Wednesday, May 17, 2017 4:47 AM

    Sorta technical question that is more of the curious variety.

    When you have to set up an automated email from a SQL server job to either a business unit customer or to an internal IT customer, how do you phrase the automated email part?

    We've adopted a cute-yet-weird little standard based on something one of our server guys started setting up. "This is an automated email. You will be disappointed if you reply." We then go on to list the proper response email address (and what group is watching that box / email list) if they have any question. It's not terribly professional, but it is different than what I've seen most companies send out.

    What about you?

    We use "Please do not reply to this email address as it is not monitored.  For assistance please contact the Help Desk."  We also use "no-reply@company.com" as the FROM address.

Viewing 15 posts - 58,591 through 58,605 (of 66,712 total)

You must be logged in to reply to this topic. Login to reply