SQLServerCentral Newsletter for January 6, 2023 Problems displaying this newsletter? [View online](. [SQL Server Central](
Featured Contents - [Ethical Hacking Tutorial](
- [Using sp_prepare and sp_execute to utilize prepared SQL statements](
- [Cross-RDBMS Code Quality Reports in Flyway](
- [From the SQL Server Central Blogs - Solar Projection v Estimates](
- [From the SQL Server Central Blogs - SQLBits 2023]( Question of the Day - [The Serverless Failover Database](
The Voice of the DBA
 Daily Coping Tip Do something outdoors today. Enjoy nature I also have [a thread at SQLServerCentral]( dealing with coping mechanisms and resources. Feel free to participate. For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from [The Action for Happiness Coping Calendar](. My items will be on [my blog](, feel free to share yours. The Best and Worst Tech of 2022 There was [an article on the worst technology of 2022]( from the MIT Technology Review. I was hoping to get some sense of what was really useful or failure-prone technology, but it seems that the article delves into decisions on how to run technology or policy more than the actual technology. The list is here, with my short comments on those that might apply for me: - The FTX meltdown
- The fentanyl crisis
- a pig heart to human transplant - maybe. A biotech attempt that didn't work
- the issues with zero covid in China
- Twitter rules
- Ticketmaster system meltdown - this counts
- Meta's Galactica - definitely among the worst Many of these seem more about decisions made in how a platform or technology is used, rather than the merits of the system. The FTX thing was less even technology and more a scam using software that likely worked as intended. For the best technology, many lists [delve into gadgets](. Those can be fun, and certainly might feel like they change how you use technology. I know that mobiles and headphones can be exciting, but these always feel incremental to me. I actually have preferred seeing how cheap mid-range headphones have become. I do think the rings measuring health instead of a watch-like device is a little innovative. Tablets, laptops, and TVs, meh. In terms of innovative tech, [this is quite a list](. Shooting a probe at an asteroid is amazing engineering. A personalized info board, seen differently by many different people is fascinating, though a bit creepy. The [DALL-E 2 image generator]( was certainly incredibly tech, albeit controversial. The 3D-printed ear is amazing as well. The world of technology for many of us (frameworks, languages, software, hardware) changes so fast. Vendors have shrunk their lifecycles as they move to a DevOps style of working, which creates pressure on us to keep up, or at least be able to learn quickly as versions change. Steve Jones - SSC Editor [Join the debate, and respond to today's editorial on the forums](
Â
 Featured Contents [SQLServerCentral Article]( [Ethical Hacking Tutorial]( akash011 from SQLServerCentral This article explains ethical hacking and how this might be a career field worth pursuing. [External Article]( [Using sp_prepare and sp_execute to utilize prepared SQL statements]( Additional Articles from MSSQLTips.com Learn about prepared statements in SQL Server, what they are, and how to use them along with the commands sp_prepare and sp_execute. [External Article]( [Cross-RDBMS Code Quality Reports in Flyway]( Additional Articles from Redgate This article demonstrates how to run basic cross-RDBMS code quality checks using SQL Fluff. We analyze the results in PowerShell to produce reports and analytics on the number or types of issues found. [Blog Post]( From the SQL Server Central Blogs - [Solar Projection v Estimates]( Steve Jones - SSC Editor from The Voice of the DBA We got a solar system in 2022 to try and fix some of our power costs and hedge against the future. We were fairly confident it would work well,... [Blog Post]( From the SQL Server Central Blogs - [SQLBits 2023]( Angela Henry from SQL Swimmer Super excited that I was selected to speak at SQLBits 2023. The conference is taking place 14-18 March 2023 in Wales. I have never been to Wales and am...   Question of the Day Today's question (by Steve Jones - SSC Editor):  The Serverless Failover Database I have an Azure SQL Database provisioned as Serverless. When I enable a Failover group, what does this mean for the automatic options of this database? Think you know the answer? [Click here]( and find out if you are right.    Yesterday's Question of the Day (by Steve Jones - SSC Editor) Power BI REST Data How can I consume data from a REST API (no credentials required) in Power BI? Answer: Use the Get Data and the Web option. Paste in the REST URL Explanation: You can use a REST API with the Web source in Power BI. Ref: How to create a Power BI report using REST API data -  [Discuss this question and answer on the forums](    Database Pros Who Need Your Help Here's a few of the new posts today on the forums. To see more, [visit the forums](. --------------------------------------------------------------- SQL Server 2016 - Development and T-SQL
[Split One Column into Multiple that uses / as the delimiter]( - I've been researching this for over 3 hours and none of the syntax I've found works. I have a column with data that's been merged from various other tables and they used a / to decipher between each field. Invoice/14/248/TD C/O BGIS/20009. 1/ 16566/JB App #5 I need to take this and get this which [â¦]
[Updating a single node in XML from SQL]( - I have a xml parameter, i need to update the node where the node / = "15500000174" and the node = 1 update node = 40  declare @myxml as xml set @myxml = ' azure_prd External OnError 2022-12-20T01:28:39.890 azure_application_to_ReceiveDelivery:S00603851:2022-12-20T01:28:39.890 [â¦]
[Query About SSIS Project Deployment]( - Hi everyone, I have designed a SSIS project which in which there are 3 packages. When I run the first package it creates some tables in database and using Execute Package Task jumps to second package and run the tasks there and in last step which is also Execute Package Task here it jumps to [â¦]
SQL Server 2012 - T-SQL
[query speed]( - I'm trying to get record counts before doing some data archive, but query performance slow. any help with syntax to speed up?  Thanks. -- Internal variables. DECLARE @Error AS int = 0 DECLARE @RowCount AS int = 0 Declare @Interval int = N'-3' -- Count the no. of records that will be inserted into [â¦]
SQL Server 2019 - Administration
[Different Disc Cluster Size in HAG Group]( - Hello SQL Administrators. For the purpose of better performance of my SQL server I must reformatting the san space of the database files and the transaction logs. My SQL server databases are running in a High Availability Group. That means two database servers and double space for my databases. So I have to do this [â¦]
[SQL on Hyperv]( - Best practice question. We have an sql application from an external partner running on sql 2019. We have some complaints, about speed or the lack of it. External company makes remarks that the server is the issue or could be the issue. We have configured everything as best practice. We think that maybe the sql [â¦]
[DB Comp. Level 110 and Cardinality Version 150 in [sys].[query_store_plan]]( - I am using Query Store in SQL Server 2019 to evaluate the performance impact of upgrading the compatibility level of a database from 110 (SQL 2012) to 150 (SQL 2019). As part of this exercise I frequently alternate between the two comp. levels, from 110 to 150 and vice versa, and looking at query performance [â¦]
SQL Server 2019 - Development
[Cama saperated values]( - Hi, this is my Query. create table #emp(Â sal int) insert into #emp(sal) values (1000),(2000),(3000),(5000) select * from #emp data: 1000 2000 3000 4000 exptext output :: 1000,2000,3000,5000 Â Â
[Proper CASE statement]( - Hello everyone, I have a situation where I am trying to organize 2 case statement into 1. There are 3 fields I literally see that sometimes I have values in all 3 defined dates and the case still return NULLs. Those are 2 versions that I have and none of them returns it correctly CASE [â¦]
[Left outer join + CTE]( - Hello everyone, I have a situation where I am trying to select * from one table and make a left outer join on a query that starts from CTE. Basic syntax below: Server doesn't want to accept LEFT OUTER JOIN on a CTE. What am I doing wrong?  SELECT * FROM table fa LEFT [â¦]
[Update query generation]( - Hi All, I am trying to generate MYSQL query by using this , But not getting correct result. Can you help. CREATE TABLE tbl1 (col1 int,col2 int,col3 int,col4 int,col5 int) go CREATE TABLE t_column_details ( [TABLE_SCHEMA] [varchar](500) NULL, [TABLE_NAME] [varchar](500) NULL, [COLUMN_NAME] [varchar](500) NULL, [length] [bigint] NULL ) go insert into t_column_details values ('dbo','tbl1','col1',2) [â¦]
Amazon AWS and other cloud vendors
[[Help] Understanding AWS RDS Costs]( - About 70% of our RDS Costs (which unsurprisingly is the largest contributor to our overall AWS costs) is attributed to Aurora:StorageIOUsage.  We have 75+ lambdas - each for a different functional use which perform multiple computes.  Is there a way to figure out which lambda would be contributing to what % of IO [â¦]
Strategies and Ideas
[Table Design Multiple Meaures and Levels]( - Hi, I after some ideas on how to create a Fact table that has multiple measures at different levels (levels is based on Level 1 the data type would be a whole number and Level 2 would be a decimal (for percentage calculation). So at the first day of each month I will get different [â¦]
SQL Server 2022 - Development
[Trigger for automatically date]( - Hello everyone, I created a trigger that inserts the automatic time in the Date column as soon as an update is made in the Comments text field. The problem here is, , that it constantly overwrites all updates that have already been carried out. It should only add the new date to the article that [â¦]
[Is there another way to solve this "group in 5 day spans" problem?]( - I ran into an interesting problem over on StackOverflow at the following link... To summarize, here's the data the op posted with 1 row removed because removing that row broke the "Accepted" solution. DROP TABLE IF EXISTS #MyHead; GO SELECT * INTO #MyHead FROM (VALUES (1 ,'2017-11-24 09:45:00.000') --These should be in Grp #1. [â¦]
  [RSS Feed]([Twitter]( This email has been sent to {EMAIL}. To be removed from this list, please click [here](. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -