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 https://www.sqlservercentral.com/forums/topic/dynamically-select-load-column-names-into-select-statement , 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... https://stackoverflow.com/questions/47388557/group-by-a-set-of-data-and-order-items-in-each-part-separately-from-other-parts 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. […] |