(Get-WmiObject -class Win32_OperatingSystem).Caption
“No problem can be solved from the same level of consciousness that created it.” Albert Einstein (1879-1955)
Thursday, 23 January 2020
Thursday, 9 January 2020
Sql Server – Split Column With Delimited String Into Multiple Columns
Method 1: To Split A Column With Delimited String Into Multiple Columns more...
Method 2: SELECT
PARSENAME(REPLACE ('John,Doe', ',', '.'), 2) 'First Name',
PARSENAME(REPLACE ('John,Doe', ',', '.'), 1) 'Last Name'
Method 2: SELECT
PARSENAME(REPLACE ('John,Doe', ',', '.'), 2) 'First Name',
PARSENAME(REPLACE ('John,Doe', ',', '.'), 1) 'Last Name'
Tuesday, 7 January 2020
Run Python with T-SQL on SSMS
1. Run the following commands in SSMS:
sp_configure 'external scripts enabled'
GO
sp_configure 'external scripts enabled', 1;
GO
RECONFIGURE;
GO
sp_configure 'external scripts enabled'
GO
2. Restart the SQL Server Service
3. Run the following command in SSMS:
sp_configure 'external scripts enabled'
GO
4. Test the code:
EXEC sp_execute_external_script
@language = N'Python',
@script = N'print(''Hello Python !!! from T-SQL'')'
More...
sp_configure 'external scripts enabled'
GO
sp_configure 'external scripts enabled', 1;
GO
RECONFIGURE;
GO
sp_configure 'external scripts enabled'
GO
2. Restart the SQL Server Service
3. Run the following command in SSMS:
sp_configure 'external scripts enabled'
GO
4. Test the code:
EXEC sp_execute_external_script
@language = N'Python',
@script = N'print(''Hello Python !!! from T-SQL'')'
More...
Thursday, 2 January 2020
SQL Key-Value Paired Join
SELECT * FROM Tabe1 u
JOIN (
(123, 'peter6@gmail.com', 3),
(555, 'jbrown@gmail.com', 4),
(946, 'jdoe12@gmail.com', 1)
) v(EmployeeId, Email, Department)
ON (
v.Email = u.Email
and v.EmployeeId = u.EmployeeId
)
JOIN (
(123, 'peter6@gmail.com', 3),
(555, 'jbrown@gmail.com', 4),
(946, 'jdoe12@gmail.com', 1)
) v(EmployeeId, Email, Department)
ON (
v.Email = u.Email
and v.EmployeeId = u.EmployeeId
)
Thursday, 5 December 2019
Wednesday, 27 November 2019
Enabling Non-Null Reference Types in VS Code
Add two new properties to any PropertyGroup: LangVersion and Nullable:
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
Enable the annotation for nullable reference types
#nullable enable
string? name = null;
Subscribe to:
Posts (Atom)
Analysis Service in Power BI Report Server
We couldn’t connect to the Analysis Services server. Make sure you’ve entered the connection string correctly... link
-
//convert BASE64 string to Byte{} array function base64ToArrayBuffer(base64) { var binaryString = window.atob(base64); var binar...
-
var htmlToPdf = new NReco.PdfGenerator.HtmlToPdfConverter(); htmlToPdf.PageFooterHtml = @"<div style='text-align:right; font-s...
-
static void Main(string[] args) { // create a dummy list List<string> data = GetTheListOfData(); // split the lis...