Why can't I paste SQL code into a post???

  • I've just spent 20 minutes preparing a new post in the SQL 2008 forum. It took me that long to get to the point where I could post the DDL description of a table, so that people would know what I was talking about. I put in the SQL Code statements necessary for the DDL code. I put in a blank space between the opening and closing tags for the SQL code snippet. Went back to SSMS to generate the CREATE TABLE command, put the cursor back on that line between the opening and closing tags, then I did a Ctrl-V to paste the code. But then

    BAMB!!!

     The editor for this website's forums just blew me out of the water, sent me straight to the home page of the forums and basically lost 20 minutes of my time! Why does this website do that???

    Kindest Regards, Rod Connect with me on LinkedIn.

  • Rod at work - Friday, February 9, 2018 11:17 AM

    I've just spent 20 minutes preparing a new post in the SQL 2008 forum. It took me that long to get to the point where I could post the DDL description of a table, so that people would know what I was talking about. I put in the SQL Code statements necessary for the DDL code. I put in a blank space between the opening and closing tags for the SQL code snippet. Went back to SSMS to generate the CREATE TABLE command, put the cursor back on that line between the opening and closing tags, then I did a Ctrl-V to paste the code. But then

    BAMB!!!

     The editor for this website's forums just blew me out of the water, sent me straight to the home page of the forums and basically lost 20 minutes of my time! Why does this website do that???

    That'll teach you. Time for an upgrade to a more recent version of SQL Server, which should fix this stuff :laugh:

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • It is an inner secret; at best, anything you may post looks crap: Try copying and re pasting! It just makes it worse with each iteration. For some odd reason I do not think that postings on here are influenced by what version of SQL Server you have installed on some remote server you may not be connected to. I sympathise and hope that someone can offer a solution!? NB writing this I got the ome page twice!!

    ...

  • I tend to paste everything into Notepad and then copy and paste it into the forums from there.  I've seen it do strange things even if I'm copying and pasting from this website back into this website.  :hehe:

  • HappyGeek - Friday, February 9, 2018 12:53 PM

    For some odd reason I do not think that postings on here are influenced by what version of SQL Server you have installed on some remote server you may not be connected to.

    You know I was joking, right?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Phil Parkin - Friday, February 9, 2018 2:02 PM

    HappyGeek - Friday, February 9, 2018 12:53 PM

    For some odd reason I do not think that postings on here are influenced by what version of SQL Server you have installed on some remote server you may not be connected to.

    You know I was joking, right?

    What? And I already upgraded everything.......

  • The formatting from SSMS is problematic. It has various forms, and this editor doesn't handle it great. The best thing I've found is to paste, then highlight the code here and choose SQL Code at the bottom of the edit box. Even that sometimes doens't work with strange mixes of CHR(10), CHR(13), and HTML tags, so I try to be careful. Overall, if you aren't sure about the code, just paste it in.

    Also, if it's more than 5 minutes work, I often use CTRL+A, C a few times as I'm working to be sure I have a copy. Maybe paste in Notepad to save it.

  • Steve Jones - SSC Editor - Friday, February 9, 2018 2:57 PM

    The formatting from SSMS is problematic. It has various forms, and this editor doesn't handle it great. The best thing I've found is to paste, then highlight the code here and choose SQL Code at the bottom of the edit box. Even that sometimes doens't work with strange mixes of CHR(10), CHR(13), and HTML tags, so I try to be careful. Overall, if you aren't sure about the code, just paste it in.

    Also, if it's more than 5 minutes work, I often use CTRL+A, C a few times as I'm working to be sure I have a copy. Maybe paste in Notepad to save it.

    The old one (sql code tags)  that you folks tweaked worked fine.  Any chance of resurrecting that?

    --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)

  • Steve Jones - SSC Editor - Friday, February 9, 2018 2:57 PM

    The formatting from SSMS is problematic. It has various forms, and this editor doesn't handle it great. The best thing I've found is to paste, then highlight the code here and choose SQL Code at the bottom of the edit box. Even that sometimes doens't work with strange mixes of CHR(10), CHR(13), and HTML tags, so I try to be careful. Overall, if you aren't sure about the code, just paste it in.

    Also, if it's more than 5 minutes work, I often use CTRL+A, C a few times as I'm working to be sure I have a copy. Maybe paste in Notepad to save it.

    Hmmm. I had done it where I put in the SQL tags first then tried pasting the code into it. So, what I hear you saying is I should I posted the code first, then surrounded it with the SQL tags. OK, I can try that.

    Kindest Regards, Rod Connect with me on LinkedIn.

  • Either way should work. I sometimes put the tags in, then the code. Sometimes the other way. Both seem to work, and occasionally, both fail miserably.

    The entire editor changed with the  forum upgrade, so codes and formatting from pasting is different. We can't go back as that's a large change from this editor, plus it removes the ability to apply patches from the vendor.

  • Chris Harshman - Friday, February 9, 2018 1:57 PM

    I tend to paste everything into Notepad and then copy and paste it into the forums from there.  I've seen it do strange things even if I'm copying and pasting from this website back into this website.  :hehe:

    I also paste into Notepad or Notepad++, then into whatever website I'm pasting it into. I did in this case as well. It still blew me out of the water, all the way back to start.

    Kindest Regards, Rod Connect with me on LinkedIn.

  • What browser are you using? Are there any strange characters in the post?

  • Steve Jones - SSC Editor - Sunday, February 11, 2018 5:32 PM

    What browser are you using? Are there any strange characters in the post?

    In this case, MS Edge. I have used Chrome in the past, but after spending 20 minutes at it I didn't want to spend another 20 minutes with a different browser.

    Kindest Regards, Rod Connect with me on LinkedIn.

  • Interesting. I primarily post in FF and Chrome. Never use Edge. I've seen weirdness on too many sites.

  • I'm using Chrome. Whenever I right click within this site's post editor window, I have the menu open 'Paste as plain text'. I've found that works better than regular 'Paste' or Ctrl-V when you don't need or want to carry over formatting.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

Viewing 15 posts - 1 through 15 (of 17 total)

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