Unable to post code

When I try to post something, it fails very frequently these days. It is some code segment that is causing the failure, but I am not able to identify what specifically in the code. Obviously, I cannot post the code segment here either. The error I see is this:

I have tried from chrome, ie, and edge

The image of the code I am trying to post is this:

I would suggest putting

    ```sql
    in front of your code and then this at the end:
    ```

You can also use

    ```text
    some stuff that is not to be colour-coded here
    ```

(note that they are Backticks) and see if that makes any difference. It should stop the forum seeing the "@" and thinking it is a UserId on here, or something else that it tries to use as a MarkDown instruction.

Personally I think that markDown is a disaster for this type of thing - it grabs perfectly innocent text, the sort of stuff that is prevalent in code, and "acts on it".

It might be the

    (stuff)(1)

type coding as I think?? the syntax for a Citation (e.g. URL to another site) used syntax similar to that in markDown.

INSERT INTO [dbo].RichTest
SELECT col.value('(.)[1]','nvarchar(50)')
FROM @RichTests.nodes('/macs/mac') AS doc(col)
WHERE NOT EXISTS(SELECT 1 FROM [RichTest] WHERE [Name] = col.value('(.)[1]','nvarchar(50)'))

Kristen,

Thank you for the suggestions.
When I tried to post the whole code it gave me an error.
Then I tried the back-ticks you suggested, and it gave me the same error.

Then, I posted only the first line. No error.
Edited and added the second line. No error
Edited and added the third line. No error.
Edited and added the fourth line. No error.
Edited and selected the code and used the code format button and saved. No error!.

So the solution is: Post one line of code at a time :slight_smile: :slight_smile: :slight_smile:

The forum software works in mysterious ways!!

Yes, yes, yes ... but you must stop doing that RBAR stuff and use SET-based processing !!!

1 Like

Hehehehe Kristen. Now THAT was funny!!