December 18, 2023 at 2:22 pm
Just saw this one pop up, not sure if it is a "known" bug or not, but thought I'd report it as I didn't see it in this section.
If I have the following code:
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM
(sample taken from a different thread), in the "edit" window and the "code" window, I see the following:
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM [table_1] AS [T1]
INNER JOIN [table_2] AS [T2] ON
([T1].[field] = 'NE' AND [T2].[NE] = 1) OR
([T1].[field] = 'SE' AND [T2].[SE] = 1) OR
([T1].[field] = 'NW' AND [T2].[NW] = 1)
With the _ replaced by spaces. If you take out the _'s, then the formatting goes all weird. It happens inside the code formatting window AND outside the code formatting window. For example:
<-- that is [table_1] without the _ in it.
EDIT - edited because I noticed that it happens on code formatting as well as outside the code formatting. Did not test in the topic title as I didn't want to risk breaking SSC.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
December 18, 2023 at 4:23 pm
Just saw this one pop up, not sure if it is a "known" bug or not, but thought I'd report it as I didn't see it in this section.
If I have the following code:
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROMAS [T1]
INNER JOINAS [T2] ON
([T1].[field] = 'NE' AND [T2].[NE] = 1) OR
([T1].[field] = 'SE' AND [T2].[SE] = 1) OR
([T1].[field] = 'NW' AND [T2].[NW] = 1)(sample taken from a different thread), in the "edit" window and the "code" window, I see the following:
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want * FROM [table_1] AS [T1] INNER JOIN [table_2] AS [T2] ON ([T1].[field] = 'NE' AND [T2].[NE] = 1) OR ([T1].[field] = 'SE' AND [T2].[SE] = 1) OR ([T1].[field] = 'NW' AND [T2].[NW] = 1)
With the _ replaced by spaces. If you take out the _'s, then the formatting goes all weird. It happens inside the code formatting window AND outside the code formatting window. For example:
<-- that is [table_1] without the _ in it.
EDIT - edited because I noticed that it happens on code formatting as well as outside the code formatting. Did not test in the topic title as I didn't want to risk breaking SSC.
You can't break the SSC forums much worse than they already are. 😉 And, no... that's not me being sarcastic... that's stating a fact. 😉
You should trying writing an article sometime. It can be a bit brutal when it comes to actual format and the position of graphics.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2023 at 4:23 pm
test
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM [table_1] AS [T1]
INNER JOIN [table_2] AS [T2] ON
([T1].[field] = 'NE' AND [T2].[NE] = 1) OR
([T1].[field] = 'SE' AND [T2].[SE] = 1) OR
([T1].[field] = 'NW' AND [T2].[NW] = 1)
and no underscore for table1
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM [table1] AS [T1]
INNER JOIN [table_2] AS [T2] ON
([T1].[field] = 'NE' AND [T2].[NE] = 1) OR
([T1].[field] = 'SE' AND [T2].[SE] = 1) OR
([T1].[field] = 'NW' AND [T2].[NW] = 1)
no both underscores
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM [table1] AS [T1]
INNER JOIN [table2] AS [T2] ON
([T1].[field] = 'NE' AND [T2].[NE] = 1) OR
([T1].[field] = 'SE' AND [T2].[SE] = 1) OR
([T1].[field] = 'NW' AND [T2].[NW] = 1)
December 18, 2023 at 4:24 pm
test
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM [table_1] AS [T1]
INNER JOIN [table_2] AS [T2] ON
([T1].[field] = 'NE' AND [T2].[NE] = 1) OR
([T1].[field] = 'SE' AND [T2].[SE] = 1) OR
([T1].[field] = 'NW' AND [T2].[NW] = 1)
and no underscore for table1
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM [table1] AS [T1]
INNER JOIN [table_2] AS [T2] ON
([T1].[field] = 'NE' AND [T2].[NE] = 1) OR
([T1].[field] = 'SE' AND [T2].[SE] = 1) OR
([T1].[field] = 'NW' AND [T2].[NW] = 1)
no both underscores
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM [table1] AS [T1]
INNER JOIN [table2] AS [T2] ON
([T1].[field] = 'NE' AND [T2].[NE] = 1) OR
([T1].[field] = 'SE' AND [T2].[SE] = 1) OR
([T1].[field] = 'NW' AND [T2].[NW] = 1)
December 18, 2023 at 4:25 pm
I think the formatting can be weird, but not seeing the issue.
Do you have a screenshot of what's broken/weird on your side? I'm chrome, 119.0.6045.200
December 18, 2023 at 4:45 pm
@steve-2 Jones - replace the _ with a space and you'll see what's happening.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
December 18, 2023 at 4:51 pm
OK, sorry, moving too fast this am. I missed that.
Test 2, space for table 1
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM
space for both tables
SELECT [T1].* -- or could do [T2].*, not certain which table row you are trying to show, you may just want *
FROM
December 18, 2023 at 4:52 pm
We that's interesting.
December 18, 2023 at 4:53 pm
I'll log a bug. I hope this is an easy fix.
December 18, 2023 at 4:57 pm
One nice thing is that with email notifications, things show up how you would expect. The other fun thing is it happens outside of the code block too:
those above lines are "table 1" with square brackets around it.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
December 18, 2023 at 5:01 pm
Yeah, the parsing for the code formatting is that there are so many cases with the regex and replacement that I think we're fixing one thing but breaking another.
Bug filed with this URL. We'll see what they say
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply