Create Contained Database from a BACPAC File
Posted: January 22, 2024 Filed under: Uncategorized Leave a commentThe target Instance needs to have this value to 1:
sp_configure ‘contained database authentication’, 1;
GO
RECONFIGURE;
GO
From the Azure SQL Database within SSMS:
>>Tasks>Export Data-tier Application>> to save exported database Bacpac file;
then Import to create a new database locally on a 2019 Instance from SSMS.
Select Rounding Datetime to the nearest 30 minutes
Posted: November 30, 2022 Filed under: Uncategorized Leave a commentImport and Export Data with PowerBI Desktop
Posted: October 10, 2022 Filed under: Uncategorized Leave a commentGet Data, thanks to Microsoft for providing so many ways to load data into PowerBI Desktop for further process. We have many ways to transfer data from one system to another. For many implementations, you can import and export data directly from these systems to meet various business requirements.
It is extremely easy to use Get Data from PowerBi Desktop from many sources(you can think about it). However, when you want these massaged data back to your original form, you may need to figure out a way to find the existing solutions developed by community developers.
A simple exporting data from Power BI operation is to copy and paste data.
Select table on the left navigation and right click inside table (any column) to show a list: choose Copy table and paste into a new excel worksheet or a new text file. The copy and past will have a size limit for how much data you can copy(less than 150000 rows or less if many columns need to be copied).
For large dataset, I tried to explore with free utilities:
One is to use Power BI Exporter(PowerBI free addon). To download all your data in a zip package (text files);
Another one is to use DAX Studio (Free tool). Export your data to SQL Server. You can do much much more with this tool if you want to explore DAX functions with this tool.
Why Query Store Not Using Forced Plan? What is “Morally Equivalent Execution Plan”?
Posted: August 23, 2022 Filed under: Uncategorized Leave a commenthttps://littlekendra.com/2018/03/12/what-is-a-morally-equivalent-execution-plan-and-why-is-it-good/
https://littlekendra.com/2018/03/12/what-is-a-morally-equivalent-execution-plan-and-why-is-it-good/
Custom row number (dense_rank)
Posted: June 10, 2022 Filed under: Uncategorized Leave a commenthttps://gist.github.com/jingyang-li/07a4bbfe21c6637bfbd8caf330cb8f10
One of Date Island Solutions
Posted: May 27, 2022 Filed under: Uncategorized Leave a commentQuestion is from here:
I have come up with one solution:
https://gist.github.com/jingyang-li/2efff23413bec8bc201492a742e0a875
Improved String_Split Function in SQL Server 2022
Posted: May 24, 2022 Filed under: Uncategorized Leave a commentselect @@version
/* Microsoft SQL Server 2022 (CTP2.0) – 16.0.600.9 (X64) May 20 2022 13:29:42
Copyright (C) 2022 Microsoft Corporation Enterprise Evaluation Edition (64-bit)
on Windows 10 Pro 10.0 (Build 19044: )
*/
declare @s varchar(100)=’1,2,4,2,5,3,6,7′
select * from string_split(@s,’,’,1)
/*
value ordinal
1 1
2 2
4 3
2 4
5 5
3 6
6 7
7 8
*/
SQL Server 2022 Public Preview(CPT2.0)
Posted: May 24, 2022 Filed under: Uncategorized Leave a commentBob Ward announced from Linkedin post: the long wait SQL Server Public Preview is available for download today(May 24, 2022).
Here is the link I used to get my local copy:
https://info.microsoft.com/ww-landing-sql-server-2022.html
Will play with the new features in next couple of days and dive into it.
Split Values into Columns –XML Solution
Posted: May 12, 2022 Filed under: Uncategorized Leave a comment