sql-docs
sql-docs copied to clipboard
Update sp-executesql-transact-sql.md
There are way more than 12 statements generated. You get one statement for each year and month combination for each language where the first 3 characters of the month name are different.
Personally, I think you would be better off using a table naming scheme that is not locale dependent like 'Sales_' + cast(datepart(yy, @PrmOrderDate) as char(4)) + '_' + cast(datepart(mm, @PrmOrderDate) as char(2))
To see the table names that you get now, run the following ...
DECLARE @PrmOrderDate DATETIME; SET LANGUAGE N'us_english'; SET @PrmOrderDate = '01/31/2021'; -- set date here because the date literal format also depends on LANGUAGE SELECT SUBSTRING(DATENAME(mm, @PrmOrderDate), 1, 3) + CAST(DATEPART(yy, @PrmOrderDate) AS CHAR(4)) + 'Sales'; SET LANGUAGE N'Español'; SELECT SUBSTRING(DATENAME(mm, @PrmOrderDate), 1, 3) + CAST(DATEPART(yy, @PrmOrderDate) AS CHAR(4)) + 'Sales'; SET LANGUAGE N'ελληνικά'; SELECT SUBSTRING(DATENAME(mm, @PrmOrderDate), 1, 3) + CAST(DATEPART(yy, @PrmOrderDate) AS CHAR(4)) + 'Sales';
@bpd0018 : Thanks for your contribution! The author(s) have been notified to review your proposed change.
Learn Build status updates of commit c7ad5bc:
:white_check_mark: Validation status: passed
| File | Status | Preview URL | Details |
|---|---|---|---|
| docs/relational-databases/system-stored-procedures/sp-executesql-transact-sql.md | :white_check_mark:Succeeded |
For more details, please refer to the build report.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
@markingmyname
Can you review the proposed changes?
Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged" @MicrosoftDocs/public-repo-pr-review-team
Learn Build status updates of commit ae47f79:
:white_check_mark: Validation status: passed
| File | Status | Preview URL | Details |
|---|---|---|---|
| docs/relational-databases/system-stored-procedures/sp-executesql-transact-sql.md | :white_check_mark:Succeeded |
For more details, please refer to the build report.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
After discussion with the product group, we are revising that paragraph further in an internal PR, which will be published in the next day or so. Thank you for your feedback.