|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Deleting a Folder in Azure Data Factory | |
I have a pipeline in Azure Data Factory, and I have added a Delete activity to my pipeline. I want to delete all the files in the "August2021" folder, and the folder itself after I've imported data. How do I configure a single Delete activity to do this? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Alessandro Mortola) |
Implicit conversion from datetime to datetime2 Which result do you obtain carrying out the following code? declare @d datetime = '20210701 12:30:45.123'; select CAST(@d as datetime2(7)); Answer: It depends on the compatibility level: "2021-07-01 12:30:45.1233333" if the compatibility level is greater than or equal to 130, "2021-07-01 12:30:45.1230000" otherwise Explanation: From the official documentation: "Under database compatibility level 130, implicit conversions from datetime to datetime2 data types show improved accuracy by accounting for the fractional milliseconds, resulting in different converted values" This means that up to compatibility level 120 the conversion simply add zeros to the fractional part in order to reach the precision required by datetime2. This is not the case starting from compatibility level 130 and "this means that certain values that previously compared equal, no longer compare equal" |
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 |
latency sql server - Hello everyone I have big problem of slowness on a SQL instance in azure the editor send me the procedure that poses the problem but I don't know what to do on the indexing side since it is a procedure Do you have a suggestion to improve the execution time? USE [MERCURE_GIT_DEVELOP] GO /****** Object: […] |
SQL Server 2017 - Development |
Capture Tables Updates-Add , updare and delete record) when Sp executed - When i run a stored procedure, i would like to capture all the Database updates with table name and preferably values updated. What tool i can use ? |
SQL Server 2016 - Administration |
Wait type LATCH_EX [NESTING_TRANSACTION_FULL] - and blocking. - We have this ad hoc query that is a recurring block leader, blocking dozens of other SPs and adhoc query. This code has not changed in years. The query had never been a massive blocker before a few days ago, and never caused issues. now it does. It causes latencies, users are waiting and timing […] |
Development - SQL Server 2014 |
Dynamic Store Procedure - hello, I want to create a dynamic StoreProcedure that would do some simple checks and that is setting these variable SET @valuesInput = (select count(distinct COLUMN_1) from [TABLE_1] where [COLUMN_1] is not null) SET @valuesInserted = (select count(distinct COLUMN_2) from [TABLE_2]) SET @countDuplicates = (select count(*) from [TABLE_2] group by COLUMN_2 having count(*) > 1) […] |
SQL 2012 - General |
needing help casting varchar to decimal - I'm needing to convert some varchar figures to decimal for sums, but can't quite find an example that works... the second block of code just returns the list of data without cast or sum: SELECT SUM(CAST([Convo] AS DECIMAL(10,2))) ,SUM(CAST([F9D2]) AS DECIMAL(10,2))) ,SUM(CAST([F9D5]) AS DECIMAL(10,2))) ,SUM(CAST([F9DMTM]) AS DECIMAL(10,2))) ,SUM(CAST([Exception]) AS DECIMAL(10,2))) ,SUM(CAST([Training]) AS DECIMAL(10,2))) ,SUM(CAST([TOTAL Time]) […] |
SQL Server 2012 - T-SQL |
output of stored procedure to text and email text - i have a stored procedure which outputs data from various table query like below. create procedure ki_data as select * from customer select * from order select * from invoices i would like to send the output of stored procedure (in text format) to email . I know how i can do it using […] |
SQL Server 2019 - Administration |
Whats the difference between SQL 2019 Enterprise and SQL 2019 Enterprise Core - I'm installing SQL on a dev server using my VS downloads and I have a choice between 2019 Ent and 2019 Ent core. We just recently switched from server/cal to core licensing and would like to know if there actually is some difference between these installs. |
In-Place upgrade from SQL Server 2016 to SQL Server 2019 leaves older version - My company has decided that in-place upgrading to SQL Server 2019 for test environments is the path that we should take for time consideration. What I have found out after doing this in-place upgrade(and I have never done one before always a side by side) is that the older version of SQL Server is left […] |
SQL Server 2019 - Development |
Using (or not) query HINTS to speed up slow statement - The following statement returns 9000 rows in about 5 minutes on both SQL Server 2014 and SQL Server 2019. It basically reads Corporations along with their "IsArchived" attribute and their current name after fetching the "NameID" from an historical table. All required indexed are defined and rebuilt. Statistics are updated. SELECT C.CorporationID, EA.IsArchived, EN.Name FROM […] |
ADD Values from a table to an another table - I am working with Microsoft SQL Server MANAGMENT STUDIO 18 and i Have 2 Tables , i want to insert a new line of values from Table 1 on Table 2 but every time that a Value From Table 1 change from False to True .Actually it works but only if i execute to This […] |
Conditional Where - Hi, I have a where clause in my query that looks like this: WHERE items.UserNumber_02 IS NULL -- ALL ITEMS OR items.UserNumber_02 IS NOT NULL -- Table is filtered How can I switch between all items and the filtered part with a parameter? |
SQL Azure - Development |
Azure SQL or MariaDB (or perhaps PostgreSQL)? - Hi, I got a question about a new system to be located in Azure. The system will have a fair amount of traffic, perhaps somewhere around 100 requests per second. Each request will be handled and logged. Perhaps the log items will be updated with more data during the request (which usually will last a […] |
Reporting Services |
Colum Header adding a 1 to the text when downloading? - Hi, I come across this once in a while, I have a column header say its"Date Added" when I download to CSV , it adds a 1 and displays as "Date Added1" Can't figure out why? Thanks |
Powershell |
Load 2 files to SQL on 1 connection - I have 2 files I'm importing and have 2 different SQL tables from the same database. How could I create one connection to the DB and load to 2 different SQL tables. Thanks. $f1=(import-csv 'c:\temp\dbsessinfo' -Delimiter '|' -header dbsession,client,qaduser,osuser,pts,qadpgm,qadmenu,pid,ostask,runtime) $f2=(import-csv 'c:\temp\dbwaitdata' -Delimiter '|' -header dbanme,progtxn,osuser,locktype,locktbl,lockrcd,lockmeth) |
Analysis Services |
Creating a Linking Column from table to the other - How can i create the employee code column from Staff List into Revenue table? |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |