Viewing 15 posts - 196 through 210 (of 748 total)
Not pure json, but this will do it:
SELECT
SerialNumber,
channelIDs.value AS ChannelID
FROM
OPENJSON(@JSON)
WITH
(
SerialNumber INT '$.SerialNumber',
ChannelIDs NVARCHAR(MAX) '$.ChannelIDs' AS JSON
) AS device
CROSS...
January 11, 2023 at 3:30 pm
CRLF is \r\n, which changes
[column 1], [Column A], [Column_2], [ColumnB], column3, column4, column5
to
[column 1],
[Column A],
[Column_2],
[ColumnB],
column3,
column4,
column5
for me in SSMS.
January 9, 2023 at 10:43 pm
You should be able to use AWS CLI or SDK for language of your choice to find/inventory all EBS for each account.
You can download billing detail reports or cost/usage reports...
January 6, 2023 at 2:34 pm
Performance issue when querying views across linked servers:
Linked server queries against views don't utilize statistics-based cardinality estimation. The cardinality estimation against a view is a constant value of 10,000.
If...
January 5, 2023 at 5:19 pm
STRING_SPLIT() is great. But be aware of potential performance impacts of using a table-valued function or variable directly -- You may find it better to insert the values from the...
January 4, 2023 at 2:33 pm
I think we know what you're asking to do.
But why would you need this in a cross-tabbed/pivoted format, especially given that you already have it in a normalized table?
How would...
December 23, 2022 at 6:44 pm
What happens if you use the following to avoid the function breaking sargability (assumption: tables are indexed to support the query)
AND (cp.from_service_date BETWEEN d.eff_from AND d.eff_thru OR...
December 22, 2022 at 5:50 pm
Or just do the xml query inline...
DECLARE @startTime DATETIME2;
DECLARE @endTime DATETIME2;
SET @startTime = SYSDATETIME();
DECLARE @lang CHAR(2) = 'fr';
SET @startTime = SYSDATETIME();
SELECT
B.ID,
...
December 21, 2022 at 10:52 pm
Your 12 months data picture didn't come through.
Please provide DDL & sample input data, & show the expected results vs. the actual results
December 15, 2022 at 7:08 pm
UPDATE using a case statement -- it looks like you only have two variations.
Is the IN clause even necessary? -- i.e., does part have to be in inmast, or can...
December 15, 2022 at 3:52 pm
If you used a stored procedure to do the update, you could also put history logic in the same procedure that does the update.
Triggers are a common way to maintain...
December 15, 2022 at 3:29 pm
It was a known problem with multiple displays: https://blog.danskingdom.com/tell-microsoft-to-fix-the-sql-server-management-studio-connect-to-server-dialog-position/
This link suggests just hitting escape (or enter) & then moving SSMS around allows you to get dialog in a useable...
December 14, 2022 at 9:40 pm
Which version of SQL Server Management Studio?
December 14, 2022 at 9:36 pm
Not SQL version/edition specific -- it happened w/ the ADS 1.40 release: https://learn.microsoft.com/en-us/sql/azure-data-studio/release-notes-azure-data-studio?view=sql-server-ver16#november-2022
December 13, 2022 at 5:01 pm
SELECT * FROM #tst
WHERE EXISTS (SELECT * FROM #tst dupe
WHERE dupe.ID = #tst.ID...
December 12, 2022 at 2:29 pm
Viewing 15 posts - 196 through 210 (of 748 total)