XTP_THREAD_POOL- lot of spids running in background when no sql workload is there.
In our L&P systems, before the actual run kickoffs we have a SOP to run rebuild indices and update statistics job. Recently we are seeing SQL memory consumption is great than 80 % even after the above jobs get completed and there is no SQL workload…
SQL Server Update particular record in a table
DROP TABLE if exists #test create table #test ( PID int, Category varchar(100), status varchar(10) ) Insert into #test values (123,'Lessthan8','compliant'), (123,'greatherthan8','compliant'), (456,'Lessthan8','Missing'), …
Last passoword updated/changed date and time in Azure SQL Database for sql logins
Hi Team, as part of compliance we are planning to generate report about when was the last time password changed/updated on all Azure sql database sql logins. Because each a every Azure SQL databases we found around 150 logins. Please provide any T-SQL
cast float to numeric
Hi! I import transactions from a table where the amount column is set to Float and some values in the column is scientific numbers (example below). I need to Cast the float column to decimal values but i cant find any solution on how to do that. Is…
sql query to recon data between 2 systems
--SQL query for getting data from 2 vendor systems --Hi All, --I get data from 2 vendor systems. I need to reconcile this data and match. I have very limited fields to compare DECLARE @vendor1 TABLE ( …
Group By and it's Highest Value using SQL Query
In the table below, how do I group by Unit and then get the highest value from Quantity of that group? I have put 21 in row 4 under HighestValue column since its the highest value among all records in Unit

Group By and Running Total and Totals using SQL Query
My sql query returns the following values. How do I Group By 2. Add Running Total 3. Add Total to get it done as shown in pictured example 1, 2 and 3 below? I need 3 queries to get the following results: 1: put it in Group By to…
get depends objects for ssis packages
I need to get list of objects depends in each SSIS package using SQL scripts or any other approach autoprocess. Example ssis solution have 2 packages. package1.dtsx package2.dtsx Package1.dtsx have 5 tasks and 2 are execute sql task and 3 are data flow…
How to Delete top 1 item after using CTE (Common Table Expression)
I am trying to delete top 1* item after using CTE. I have the bottom T-SQL statement which works fine with select statement on the second part. with cte as ( select *, email_cnt = count(*) over (partition by "User"), …
changing the endcoding of an attached file in sql trasaction
Hi, I have written a sql server procedure which sends the result of a query as a csv file via e-mail. SQL server generates the attached file in UTF-8 BOM encoding. I need the attached file to be generated in UTF-8 (without BOM). I tried to…
Issue Submitting Module Assessment – Submit Button Not Responding
Dear Microsoft Support Team, I am encountering an issue while trying to submit my "Module Assessment" on your platform. I have already completed all the questions and selected the correct answers (as shown in the attached screenshot). However,…
Moving data from one storage account to another using stream analytics is creating duplicate data
Hi, I'm using Azure databricks for data analysis and have data going into a gen2 datalake storage account which then gets moved to another using the 'write once' mode on the output. What I'm seeing is that data in the second account seems to be…
TSQL Datetime convertion from UTC to AEST
Hi, I have a dataset of around 3 years and I need to do some calculations. The issue is that the dates are in UTC format but I need to convert them into AUS Eastern Standard Time I tried AT TIME ZONE but that is not working for me since it…
Using OPENROWSET to Export to .csv Not Inserting Rows
When I execute the code below in SSMS I receive the message X rows affected where X is the number of rows in mytable. When I open myfile.csv it remains empty except for the headers which were in the file prior to me executing the INSERT. Is there some…
Execution order in a stored procedure
Hi, Need some help. Easy example. Lets say I have two store procedures, A and B, as below. CREATE RPOCEDURE dbo.A AS BEGIN; DECLARE @id int=1; WHILE(@id <5); BEGIN; EXEC sp_executesql dbo.B @id=@id …
exercise link not working
https://microsoftlearning.github.io/dp-203-azure-data-engineer/Instructions/Labs/08-Explore-data-warehouse.html This question is related to the following Learning Module
SQL Query with group by and update
Hi, I have temp table that has data like this: DECLARE @tmp1 TABLE ( Amount money, sip varchar(12), ShortName varchar(20), Fund varchar(8), SettleDate varchar(50), TrnType varchar(12), SecDesc varchar(100), Par decimal(14,0), Price…
Bulk Insert from csv having issues with double quotes
Hi Team, I am using Bulk Insert to load the data from CSV into SQL Table. I have used , (comma) as a field terminator and it was working fine. But in my csv file I have the Project Manager field which has in the format as (Lastname,…
Calculate Vehicle Engine distance, duration with respect to start and end time
Calculate Engine start time, end time, distance, duration for the vehicle CREATE TABLE Vehicle(Veh varchar(10), VDatetime datetime2, Eventtype varchar(10), Odometer int) INSERT INTO Vehicle(Veh,VDatetime,Eventtype,Odometer) VALUES('V1', '2025-01-01 10…
Timeline for SQL agent jobs
Has anyone found a tool (other than Excel) that will build a horizontal timeline of SQL agent jobs? Had a look at various project tools what produce a Gannt but they are not really working for this. Thanks in advance.