performance tuning in sql
Hi, how to do a performance tuning in large set of sql data ... please help me with the steps and not link how cluster and not cluster index works in terms of disk space and memory
SQL Recursive query to generate output
Hello Expert , I am trying to generate one output as: Two different Tables: Table1: Cat1, Vol,Rank Cat1, 1, 1 Cat1, 4, 2 Cat1, 6, 3 Table2: Rank, Vol_Threshold, Partition 1, 21, 1 2, 27, 2 3, 34, 3 Would like to generate output: if running first…
Bulk Insert not working in SQL Server 2016
Hi, I am trying to insert the following CREATE TABLE Palletinfo ( id int IDENTITY(1,1) PRIMARY KEY, Parcel_Id varchar(20), Pallet_Id varchar(10), Date_Upload datetime, ); ID,Parcel ID,Pallet_ID,Date_Upload …
find duplicate record
Hi, have 3 rows in one table how to remove 2 duplicate from table 1, 2, 3 1, 2, 3 1, 2, 3
SQL Server Login with view to only one database
Hi I have a request to create a SQL account on my Instance of SQL 2014 I want the user to connect to instance - Done And have read write access to only 1 schema - Done view only 1 database - Not working out How i can i restrict user to see only 1…
SSIS not inserting all rows from ODBC (oracle) to SQL server 2019
I have an issue with migration to SQL server 2019. My Source is Oracle and my Destination is Microsoft SQL Server 2019. My package consists of a simple Data Load task; ODBC Source Connection(oracle)/ and OLE DB Destination connection(2019 SQL…
tsql sum amount recursively without recursive cte
Hi, I need help creating recursive query to sum up Amounts of all ChildIDs for parent ID=1 node. Table definition and data below. This is for SQL serverless where Recursive CTE is not supported. So left join would do, The table is large and the query…
TSQL month name to date
Hi, I have a table with a MNTH column that contains month prefixes - 'JUL', 'AUG', 'SEP', 'OCT', etc., up to 'JUN' of next year. My financial year for this data starts in July and ends in June. Thus, in this data set - start from 202407 up to 202506. In…
Using Temporary Tables and Re-Using Temporary Tables in a SSRS Report
So we need to standardize Member Eligibility by using a SQL Server Stored Procedure that will be called, Executed by our Patient/Member SSRS Reports. The SQL Server Stored Procedure currently uses a Global Temporary Table to pass its result set back to…
Split one column into multiple column
Dear my friends, I have a question about how to split one column into multiple column ? I've try the code but it doesn't work Does anyone could help me ? Thank You for your help Best Regards, Steve Henry
How to covert UTC time to CST
I have a dataset recorded in UTC format. I want to covert it and add a field as CST. I used convert(datetime, switchoffset(convert(datetimeoffset, @UTCTime), datename(TzOffset, sysdatetimeoffset()))) to covert CST. However, I found it changed the time…
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Hi Team, We are getting below error while running query in SSMS: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Normally it shouldm't take more than 2 mins. But from…
Unable to install sql server 2022 express on my Personal laptop. Could you please help with it? Iam struggling here. Any amount of help is appreciated
The following is the message i see in my log file Overall summary: Final result: Failed: see details below Exit code (Decimal): -2147467259 Start time: 2024-10-31 14:13:52 End time: …
msdb.dbo.sp_send_dbmail running in SQL Agent
Hello I have a SSIS package that all runs fine in Visual Studio, but fails when it runs in SQL Agent, most of the Tasks work and 95% of the time the package completes successfully, it just when it hits my Execute SQL task that has msdb.dbo.sp_send_dbmail…
SQL Server 2022 RTM-CU13 KB5036432 sql replication do not work on availability database of always on availability group
Hi Sir/Madam, My name is Bao Viet from Vietnam. Current im involving in a project and in that project we decide to use SQL Replication to synchronize a table to a remote SQL Server. On customer site, i have a cluster with 2 node, which were setup as…
How detecting the field that causes "string or binary data would be truncated" error
Hi, I'm working on a SQL Server 2017 (RTM-CU31-GDR) instance and I'm testing an INSERT INTO ... SELECT ... FROM ... statement that unfortunately causes a "string or binary data would be truncated" error. If possible, I'd like to save…
Collation issue when using merge
Trying to load data from TableA (Source) to TableB (Target) by Merge query. One of the columns in TableA is Latin1_General_CS_AS, while the target column in TableB is Latin1_General_CI_AS. Should I firstly change collation setting in Table B before…
Select top 1 field with same table
I have written this query but its executing very slow, We have 8000 of rows and this query takes almost 10 mins to execute. If anyone can help with this query optimization will be grateful. SELECT v.iID_Event_People, CASE WHEN…
tune query in sql
Hi, How to tune below query in sql,if it has 1 billion records Select A.*,B.* from INTO TEMP TableA inner join TableB ON TableA.PersonID=TableB.PersonaID where TableA.PersonCity In ('A','B','C') and TableB.personCity in ('A','B','C'))
IN SSIS How to change SQL Authentication to Windows Authentication
HI I was trying to deploy the packages in to server it is erroring out with the below error . TITLE: SQL Server Integration Services The operation cannot be started by an account that uses SQL Server Authentication. Start the operation with an account…