|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Committing the Work | |
I need to reverse two values in two different rows, and I want to ensure both changes complete. I run this code as the first code executed after connecting to the instance:
BEGIN TRANSACTION UPDATE dbo.ArticleSeries SET BannerImageFileID = 234 WHERE ContentItemID = 10 UPDATE dbo.ArticleSeries SET BannerImageFileID = 235 WHERE ContentItemID = 11 COMMIT WORKWhat happens? | |
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) |
Autocommit Transactions If I have a transaction that commits immediately after the execution of the T-SQL DML statement, which type of transaction is this? Answer: Implicit transaction Explanation: An implicit transaction is one where the transaction starts and is committed by the statement, DML or DDL. In SQL Server, this is the default for most statements. An INSERT creates an implicit transaction by itself, by default. Ref: Transactions - https://learn.microsoft.com/en-us/sql/t-sql/language-elements/transactions-transact-sql?view=sql-server-ver16 |
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 2017 - Administration |
Cons vs Pros of using SSISDB deployment vs File Sytem deployment of SSIS pkgs? - If we are using File System Deployment of SSIS packages pretty much accross the enterprise, and examining pros and cons of possibly switching to SSISDB catalog type of deployment (SQL Server 2016 and 2017, Visual Studio 2015 (and other versions)). What should we be strongly aware of before engaging into such change? There got to […] |
The subscription to publication 'xxxxxx' has expired or does not exist, how to r - Replication-Replication Distribution Subsystem: agent (null) failed. The subscription to publication 'xxxxxx' has expired or does not exist, how to remove it? |
Uninitialized subscription - how to fix Uninitialized subscription in replication monitor? |
SQL Server 2016 - Administration |
Azure Server VM connection to OnPrem SQL - Hi i have a Azure VM that cannot connect to my onprem sql2016 server via SQL connection string i have tested the following from my Azure VM to my onprem SQL RDP - Works SQL MGMT Studio - Works Ping - Works |
SQL Server 2016 - Development and T-SQL |
Help Modify Query to Strip Out Field Values - Hello Community, The following query will remove values after the comma in field category, and rename the field to updatedfiels with the values shown in the image below: This is fine. However, the query can't handle values without a comma. In the sample data below the value Finance is a single value, but when I […] |
Query with a twist having pivot requirement - Hello friends, i am trying to get one type of data which has some weird mappings and pivot requirement as well. Here is the sql to create sample data: create table #temp_module (module_id int, module_name varchar(50), metrics int, createdate datetime) insert into #temp_module select 1, 'account', 2, getdate() union all select 2, 'inventory', 5, getdate() […] |
Ranking functions - I need a second set of eyes to help with my lunacy/stupidity/senility. I've got a set of interview questions, the categories of the questions, and the interview guide that "packages" them together. I want each question category within an interview guide to be numbered, and each question within each category to be numbered. Like this: […] |
SQL 2012 - General |
Where did all of the SQL Server DBAs go? - For 15 years, I was a Microsoft SQL Server DBA, Developer, etc with all of the accompanying Microsoft certifications (up to SQL Server 2012). Had to take a sabbatical for family reasons beginning in 2014. Now that I am attempting to re-enter job market, I have learned that ALL of my Microsoft certifications have gone […] |
SQL Server 2019 - Administration |
Uninitialized subscription - Uninitialized subscription showing in my replication monitor,how can I fix it? |
SQL Server 2019 - Development |
Getting MAX and MIN values for all values in a field - I have such a situation. I am trying to get MIN and MAX values of one field for all rows. MIN (WEEK_P) should be always one value 20220917 for all fields all the time. Now the Window Function doesn't work for some reason. Is there anything I am doing wrong? SELECT FNL_DC AS 'DC', […] |
value @@trancount in stored procedure - Hello everyone In my code, I often use nested stored procedures. The processing of my stored procedures all perform several operations in the database, so they are encapsulated in a transaction. My stored procedures children can also be performed as a parent. I therefore start all my procedures stored as a child by a BEGIN […] |
Reset varchar length to 19 from 4000 in a concatenated date - I import a table from a comma delimited file that has a separate date column and a separate time column (among other columns.) I used to import the data into an Excel spreadsheet and manipulate it there and append the data to an existing table, but now I want to do it in Sql Server […] |
Azure Data Factory |
Data factory question - Upon my adventures of Azure data factory and all the wonders it can do I have stumbled upon a issue that Microsoft support has no answer as of yet. Long story short, I am trying to ingest data from a storage blob in another tenant. That customer will only allow us to connect to that […] |
Reporting Services |
Exceptionally slow response times for any SQL reports - SQL2012 - Dear all - I've been advised by a colleague that their system has been upgraded from Oracle 12 to Oracle 19. Any SQL reports are connected via Oracle ODBC version 19 to the back end Oracle DB. Since the upgrade any SQL reports take a long time to run & eventually display a timeout message, […] |
Integration Services |
SSISDB - where to find the dtsx XML text - I am trying to find out where the DTSX packages are stored in the SSISDB. I found numerous articles on how to pull that information when the packages are deployed to the msdb database but really having a hard time finding anything on the newer deployment style for the SSISDB. Any help getting in the […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |