Skip to content

Conversation

@srutzky
Copy link
Contributor

@srutzky srutzky commented Nov 9, 2017

  • Removed false statements related to \ being a client tool feature and not a feature of T-SQL. The line continuation character is indeed a feature of T-SQL as I proved in the following post: Backslash (Line Continuation)
  • Renamed from "Backslash" to "Backslash (Line Continuation)" because, well, that's what it is ;-)
  • Added example for splitting a binary string

One thing that I did not change was the filename. It is currently sql-server-utilities-statements-backslash.md, but it doesn't really make sense to have "sql-server-utilities-statements" as part of the name since it isn't a utility / client statement. However, there are people who have linked to this URL so changing the name would break those links and that seems worse than having a poorly named file. Is there a protocol for making such changes that includes placing a file with the "old" filename here that does a simple redirect to the new location? If not, then I guess we are stuck with the misleading name.

* Added 6 missing properties to reference page.

* Made some Acrolinx fixes.

* acrolinx updates

* link cleanup

* switch to cardsL

* a ltitle more cleanup

* a ltitle more cleanup2

* a ltitle more cleanup3

* Added Resources section to TOC per Craig's suggestion.

* Had to remove parens to fix a validation error.

* Changing mistaken memory limit of 2 GB back to 3.25 GB

* Another try at fixing mysterious validation error.

* AAAAAAAAAAAAAAAAAAARGH

* Added spaces after EOL in desperate attempt to fix.

* Okay, this time I tried removing whitespace.

* removce duplicate

* redirect

* Okay, this time I removed the trailing backsplash.

* Okay, this time I removed the asterisks from the next line.

* Oh.

* Minor fixes

* Fixed a broken link.

* Update quickstart-install-connect-clouds.md

aws added

* removed en-us from urls

* Update quickstart-install-connect-clouds.md

* Revised out-of-date topic for current tool.

* Forgot to update freshness date.

* Removed a reference to 2016 version.

* Update quickstart-install-connect-clouds.md

* Update TOC.md

* Update install-sql-server-servicing-updates.md

* added "or later" as recommended by @douglaslMS

* Minor fixes

* little correction of bytes vs. characters

* Fixing docker link to windows image

* Minor fix

* Fixed erroneous default value per email from dev.

* Made some Acrolinx fixes.

* updated virtual machine list

* Acrolinx changes

* Add missing closing bracket

* returning the right content to the OLAP catalog page

* Fix emphasis

* returning the right content to the OLTP catalog page

* reverted SqlBindR link

* Update database-catalog-oltp.md

* Add Oxford comma for consistency

* removed bold from VM name

* deprecated reference to config file

* updated branding

* updated branding. added Python

* Acrolinx fixes

* Acrolinx fixes

* Shortened the new TOC entries I added yesterday.

* minor fixes

* add APS

* added graphics to headers

* C6026: Unrecognized character in title

Hello, @Shamikg,

Localization team have reported source content issue that cause localized version to have broken format compared to en-us version. 
There are characters instead of an apostrophe.
Please help to check my proposed file change into the article and help to merge if you agree with fix. If not, please let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR, or if I should close this PR as by-design. In case of using another PR, please let me know of your PR number, so we can confirm and close this PR.

Many thanks in advance.

* C6026: Unrecognized character in title

Hello, @Shamikg,

Localization team have reported source content issue that cause localized version to have broken format compared to en-us version. There are characters instead of an apostrophe.

Please help to check my proposed file change into the article and help to merge if you agree with fix. If not, please let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR, or if I should close this PR as by-design. In case of using another PR, please let me know of your PR number, so we can confirm and close this PR.

Many thanks in advance.

* edits. added images

* vendor edits

* vendor edits

* C6028: Unrecognized character in title

Hello, @Shamikg,

Localization team have reported source content issue that cause localized version to have broken format compared to en-us version. There are characters instead of an apostrophe.

Please, help to check my proposed file change into the article and help to merge if you agree with fix. If not, please let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR, or if I should close this PR as by-design. In case of using another PR, please let me know of your PR number, so we can confirm and close this PR.

Many thanks in advance.

* removed images, left colour

* C6029: Unrecognized character in title 

Hello, @Shamikg,

Localization team have reported source content issue that cause localized version to have broken format compared to en-us version. There are characters instead of an apostrophe.

Please, help to check my proposed file change into the article and help to merge if you agree with fix. If not, please let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR, or if I should close this PR as by-design. In case of using another PR, please let me know of your PR number, so we can confirm and close this PR.

Many thanks in advance.

* C6030: Unrecognized character in title

Hello, @Shamikg,

Localization team have reported source content issue that cause localized version to have broken format compared to en-us version. There are characters instead of an apostrophe.

Please, help to check my proposed file change into the article and help to merge if you agree with fix. If not, please let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR, or if I should close this PR as by-design. In case of using another PR, please let me know of your PR number, so we can confirm and close this PR.

Many thanks in advance.

* Update what-s-new-in-ssma-for-sybase-sybasetosql.md

* updated branding, instructions, and screenshots

* edits

* edited client topics

* updated main setup topic. added images

* edits to main command line setup topic

* edit pass: dma-assesssqlonprem

* updates

* updated reference topics

* update branding in the setup FAQ

* branding updates

* link fixes

* Fix repeated sentence

Remove one occurrence of "Top is a logical and physical operator." from being repeated twice.

* C3116: LOCBLOCKER - Missing content due to incorrect format 

Hello, @BYHAM,

Localization team has reported source content issue that cause localized version to have blocked content. All < > which are incorrectly place should be removed. 

Please, help to check my proposed file change into the article and help to merge if you agree with fix. If not, please let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR, or if I should close this PR as by-design. In case of using another PR, please, let me know of your PR number, so we can confirm and close this PR.

Many thanks in advance.

* Various updates to Everest overview topic.

* Made one more formatting update.

* Update always-encrypted-database-engine.md

Fixed a typo.

* added new tokens and update tokens for new branding

* Acrolinx edits

* ACrolinx fixes

* Acrolinx fixes

* fixed includes

* Update guidelines-for-online-index-operations.md

removed public preview for resumable index

* corrected ms.workload metadata values

* Update alter-index-transact-sql.md

Removed public preview for resumable index

* Metadata updates for author and manager.

* Update sys-index-resumable-operations.md

removed public preview

* removed double ms.prod

* Update create-table-transact-sql.md

Remove public preview

* Update create-table-transact-sql.md

* removed bookmark from link

* repaired include

* Light update to refresh

* Fix duplicate SQL 2012 in supported servers

Hopefully I did that right, I'm a little new to Git/Markdown.

The following URL lists SQL 2012 twice but then later on shows that SQL 2014 is supported with the SQL Native Client v11.0

https://docs.microsoft.com/en-us/sql/relational-databases/native-client/applications/support-policies-for-sql-server-native-client

* Fix bad example for sp_changemergepublication

As is [documented](https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-changemergepublication-transact-sql), `sp_changemergepublication` only accepts `90RTM` and `100RTM` for `publication_compatibility_level`, and it will give an error on other values. It's neither necessary nor possible to increase the compat level beyond `100RTM`, even for later versions of SQL Server, and implying it is [confuses people](https://stackoverflow.com/q/47076507/4137916).

A possible alternative is to remove this example altogether, as, at present, almost nobody has any need to change the property.

* fix typo in COALESCE function description

* Removed some extraneous characters from code sample.

* Add Partners to Montiroing.

* Add quest

* Update sentryone link

* Capitalize "Datasheet"

* Match spec dimension width (160 Px)

* adding reference to SQL2017

* Fixed SQL Server version number to match metadata

Metadata says:
ms.prod: "sql-server-2016"
but doc said:
"SQL Server 2012"

* Update sql-server-help-installation.md

* Unclear large string types can't be used

The description of the data type does not explicitly call out nvarchar(max) or varchar(max) which don't work.

* Unclear large string types can't be used


The description of the data type does not explicitly call out nvarchar(max) or varchar(max) which don't work.

* Update sql-server-linux-setup.md

* Update quickstart-install-connect-clouds.md

* Linked to regions page, removed supported regions.

* Removed en-us from URLs.

* added new Python issues

* added issue for path of pretrained models

* added strings as factors issue which is not specific to SQL but a common one

* Acrolinx fixes. Amendments from Tri (developer)

* added updated art. started update of older Python and R topics

* Update alter-database-scoped-configuration-transact-sql.md

Removing the "public preview" remark about IDENTITY_CACHE, since we are no longer in public preview :)

* updated links

* branding and links

* Update database-catalog-oltp.md

* Update database-catalog-oltp.md

* minimal edits. created bugs for missing content

* edits. created bug for updates

* Update quickstart-install-connect-clouds.md

* updated max capacity for SQL2017

* Acrolinx fixes

* updated branding and fixed typos

* added implied auth art and updated related topics

* Update maximum-capacity-specifications-for-sql-server.md

* removing reference to index count

there is no longer a limit on nr of indexes on SQL2017

* note about index limit

* Update sp-server-diagnostics-transact-sql.md

* Update compute-capacity-limits-by-edition-of-sql-server.md

* Update compute-capacity-limits-by-edition-of-sql-server.md

* meta

* acro

* Update indexes-for-memory-optimized-tables.md

* C6025: LOCBLOCKER - Missing ``` that blocking content for localization

Hello, @jeannt,

There is a source  issue that causes localizable text to be blocked from localization.  Missing ``` are blocking content for localization.
Please, help to check my proposed file change and help to merge if you agree with fix. In case of using another PR, please let me know of your PR number, so we can confirm and close this PR.

Many thanks in advance.
This reverts commit 6db2a69.
* Removed false statements related to `\` being a client tool feature and _not_ a feature of T-SQL. The line continuation character is indeed a feature of T-SQL as I proved in the following post: https://SqlQuantumLeap.com/2017/10/27/line-continuation-in-t-sql/
* Renamed from "Backslash" to "Backslash (Line Continuation)" because, well, that's what it is ;-)
* Added example for splitting a binary string
@craigg-msft
Copy link
Contributor

Thank you @srutzky . @MightyPen could you please review.

@MightyPen
Copy link
Contributor

Hi @srutzky , [A] We rarely change .md filenames unless there is an extra compelling reason (beyond a nice-to-do). [B] I am not convinced that the thrust of this PR 212 is completely correct. I read your blog, but the surrounding context of its examples are not entirely clear to me. When I try the backslash in the context of SQL Operations Studio ("SqlOps"; think sorta approx SSMS), the Transact-SQL interpreter is treating the '' like a plain character; both on SELECT and on PRINT.
That is why I am not proceeding with this PR 212 at this time.
Thank you. (MightyPen = GeneMi at MS)

@MightyPen
Copy link
Contributor

#hold-off

@srutzky
Copy link
Contributor Author

srutzky commented Nov 13, 2017

@MightyPen Hi there. For (A) Ok, that's what I had pretty much assumed. Thanks for confirming that. For (B), what exactly did you try? Did you execute code against SQL Server or did you just see how it was perceived via SqlOps IntelliSense? I don't know what you mean by

the Transact-SQL interpreter is treating the '\' like a plain character

The issue here is that the documentation currently states that using a backslash at the end of a line is a function of the client tool, not of the SQL Server Engine. My example code shows that statement to be 100% false. You cannot use the "GO" batch separator in Dynamic SQL as that is only known by client tools. But that is the case with the backslash.

@MightyPen
Copy link
Contributor

@srutzky In our new tool named SQL Operations Studio, I ran the following two-line Transact-SQL statement:

print N'albert
einstein';

The displayed results were the following two lines, Not all the text on one line (and I will try to attach my screenshot image
line-continuation-test-pr-212-srutsky-sqlsos
):

albert
einstein

FWIWorth, the presence or absence of the N made no difference.
There is seeming inconsistency, because the backslash did have the effect you predict when I changed from PRINT to SELECT.

When the tool context is changed to SSMS, the results are as you predict.
But overall, my test results confirm that the effect of the backslash is affected by which tool is used to submit the T-SQL code: but if the locus of the \ effect was in the T-SQL interpreter, no tool would return a two-line result (I presume).

You might want to test with a C# program that uses ADO.NET, to bypass our tools and their differences?

So, perhaps I might obtain more insight into whether the T-SQL interpreter treats \ as special. But as of now, I am not comfortable with proceeding with this PR 212. Nevertheless, I have learned a couple interesting things from working with you on this PR. Thanks for that too.

@srutzky
Copy link
Contributor Author

srutzky commented Nov 13, 2017

@MightyPen Thanks for including that description of your testing and the screen shot. I cannot tell from the screen shot, but just to make sure, is there any space or anything else after the \ and before the return on the "albert " line? If so, that will cancel the line continuation.

Yes, I will test via SqlClient in C#, but just to mention, what you are seeing could easily be due to a bug in SqlOps that escapes the \ prior to sending it to SQL Server. And in fact, I just realized that you just found a bug in SqlOps: whether handled in the client tool or in SQL Server, there is no reason that you should not have seen "albert einstein" on a single line if that first line ends with a \. And just to be sure about the difference in behavior when switching to SELECT, since the SELECT can't show a newline and would print on the same line in the cell anyway, how about testing out the binary string example, both using PRINT and SELECT. If the binary string works in only the SELECT then the bug is only with PRINT. And, if neither works, then the bug is with the \ handling in general. That a client tool mishandles input and/or output is not without precedent:

"GO" in 2nd half of nested block comments breaks batch parsing in SSMS and SQLCMD

and:

SSMS ignores final \r\n / CRLF / Carriage Return + Line Feed in PRINT and RAISERROR

Finally, it just occurred to me that your testing does not impact the legitimacy of the changes that I made. I am not meaning to come off as argumentative, but the current documentation states that line continuation is not a feature of T-SQL / SQL Server. My examples in my blog post prove that entirely incorrect. You should try running the stored procedure example code since it bypasses the client. I suspect that you will see the correct output if you run the stored procedure examples.

Upon proving that line continuation via \ does indeed work within SQL Server when no client tool is involved (the Dynamic SQL in the stored procedure executes prior to anything being sent back to a client tool to be displayed), then any effect that any client tool has is a completely separate matter, and is actually a bug with that client tool (as you just discovered).

@srutzky srutzky changed the title Correct false statements and fix title Correct false statements re: "Backslash" and fix title Nov 13, 2017
@MightyPen
Copy link
Contributor

@srutsky You have convinced me. Thanks for the extensive info you provided, and for your persistence. I will recommend Approval of this PR 212.

@MightyPen
Copy link
Contributor

@craigg-msft Craig, I believe that we Should Approve this PR 212. (SRutsky responded well to my earlier concerns.) Thanks.

@srutzky
Copy link
Contributor Author

srutzky commented Nov 13, 2017

@MightyPen Thanks, and you are welcome 😄 . Do you have a moment to test the stored procedure example from my post? It shouldn't take long, just copy and paste. I would test myself, but SqlOps isn't going to be available for another few days, I believe.

If this is a bug within SqlOps, then who should file it, you or me? I just looked at MS Connect and don't see a way to select it as a version, though I suppose it would go into the "Tools (SSMS, etc)" category.

@srutzky
Copy link
Contributor Author

srutzky commented Nov 14, 2017

@MightyPen and @craigg-msft To follow up on the suggestion to test with C# / SqlClient, I think even if that shows the behavior I expect, one could argue that it is still a client program and hence handles the backslash. So, I came up with a more independent approach and tested via SQL Server Profiler. By looking at the exact T-SQL submitted to SQL Server by SSMS (or SQLCMD, etc), we can determine, without a doubt, where the line continuation is being handled. If handled by the client, then it won't be seen in Profiler, and if seen in Profiler, then definitely not handled by the client. And yes, it did come through into SQL Server so definitely not handled by the client (unlike GO which is never seen in Profiler, unless it is followed by an error). I have updated my blog post with this additional test.

@craigg-msft
Copy link
Contributor

Thanks you @srutzky and @MightyPen merging

@craigg-msft craigg-msft merged commit 2b55edf into MicrosoftDocs:live Nov 15, 2017
@srutzky
Copy link
Contributor Author

srutzky commented Nov 17, 2017

@MightyPen (and @craigg-msft ): Just to confirm this behavior, now that SqlOpS is available for download, I just installed it and tested out the backslash for both character and binary strings. It works as expected for both. It must be that there was, as I had suggested at the time, a space (or some other, non-printable character) to the right of the backslash in MightyPen's test shown in the screen shot above. Putting a space to the right of the backslash is the only way I am able to reproduce the behavior shown in the screenshot above.

So, no bug in SqlOpS 😄 .

@srutzky srutzky deleted the SRutzky-CorrectFalseStatements-01 branch November 28, 2017 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants