|
|
|
|
|
|
|
Question of the Day |
Today's question (by BTylerWhite): | |
Unpacking a List in Python | |
I have created the following list in Python 3:
languages = ['C#', 'Python', 'R']I decide I want to assign variables to each element in the list by unpacking it. a, b, c, *d = languagesWhat is the expected output when I execute the following? print(b) | |
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) |
Backing up to the same Azure File I want to send a second copy of my SQL Server 2019 database backup to Azure Blog storage as an emergency. To make things easy, I specify the command as follows: BACKUP DATABASE AdventureWorks2016 TO URL = 'https://mylargecompany.blob.core.windows.net/SQLServerBackup/AdventureWorks2019.bak'; This works fine on day one, but I get an error on day two. What do I need to add to this command? Answer: WITH FORMAT Explanation: The WITH INIT command is used on premises, but this doesn't work with blobs. WITH FORMAT is used. Ref: SQL Server Backup to URL - https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/sql-server-backup-to-url?view=sql-server-ver15 |
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 - Development |
Making 1 row from 2 - I'm struggling a bit here. It seems easy, but I 'm not getting it. I'm trying to make 1 row from 2 rows where if 1 row has no data and the second one does, then get the distinct row with all the data. Kind of a merge. My example table with 2 rows of […] |
Stacked instances of SQL 2017 Express, unable to complete a distributed txn - I have two instances of SQL 2017 Express installed on a given computer. Computer name is WINDEV2004EVAL and the instances are named SQLExpress1 and SQLExpress2. When I try to perform a distributed transaction between the two instances, I am encountering the following error after a three-minute stall Msg 8501, Level 16, State 2, Line 6 […] |
SQL Server 2016 - Administration |
DB Space Script - Arithmetic Overflow - Hi All I have the below script that I use to check DB space on my SQL instances. I've now run into an issue where I keep getting Arithmetic Overflow errors because of the size of some of the DB's. Can anyone guide me into fixing this up? Thanks Script: ------------------------------Data file size---------------------------- […] |
SQL database compression before shrink ? - Hello, I have a question about some maintenance. I need to do some shrink for 2TB from 7TB allocated DB, because we did some deleting and set some auto-deleting so should not be now drastically increased and we want to have more free space on disks. I had an idea below compress the whole DB, […] |
IntelliSense no longer working - I recently got a new laptop at work and now IntelliSense is no longer working in SSMS 2016. It always worked fine before, so I'm assuming it's some kind of local configuration issue or something, not a server-related setting or access issue. I've tried all the usual stuff: making sure IntelliSense is enabled, refreshing the […] |
SQL Server 2016 - Development and T-SQL |
Self referencing formula has me stumped - I have spent so long looking at this I have become blinded. I don't even know how to properly describe this problem. I am trying to determine a selling price that includes a fee that is dependent on the selling price. I need to calculate the selling price including the fee by leaving a margin […] |
Splitting a crazy column into two new columns - Hi all, I have some data which is provided, unfortunately I have no control over the format. One crazy column contains some data i need to split into two columns, i can't even think how to do this... So this is the crazy data in that column: Booked on: 20/03/2020 10:52 by: A1234567 Is there […] |
Development - SQL Server 2014 |
Find run of repeating value - Hi In the below input test data, ID is unique and in ascending order (not incremental values). I want to find runs of at least three 1s, and return the result below. The 0s would be any values that are not 1. I'm thinking there must be some 'standard' way to do this, such as […] |
SQL Server 2019 - Administration |
Database distribution in AlwaysOn - Good morning all , I have an on Always On SQL server configuration where transactional replication is configured If I open SSMS I find that the distribution database is set to AlwaysOn on then I cannot find the synchronized word thanks |
SQL Server 2019 - Development |
PowerShell command to Run SQL file Fails asking for a variable - Good morning team, I can run a .sql file that contains a SQLCMD command, with no errors via SSMS. This is a job script. When i call it to run from PowerShell it fails asking to define a variable when it should be a literal inside a job step. Is there any code i can […] |
DLOOKUP in SQL - I tried looking up a comparable function in SQL to the DLOOKUP in ACCESS. I had this working in ACCESS, but since I now am learning SQL i'm looking for some help to how to write this is SQL. Overview: Query will be used on a Table called "A" to lookup field name 'Price' get […] |
Azure Data Factory |
Move file to Archive after copy and delete the files - Hi All, I have a data pipeline to get the files from an SFTP Server and COPY into ADLS Gen2. Now i want to add an additional functionality. After the COPY Activity i want to move those files to an Archive folder and delete the files from the Current folder. I have done this using […] |
Anything that is NOT about SQL! |
DBA progress/career development/ path - Hi I am an post-grad and mssql server dba with around 5/6 years of experience and currently confused about my carrier progression and with all this cloud automation i am worried that dba (purely administrator role) might get diminished or disappear whole together so i am here for help I would like to know what […] |
sql server laptops using AMD processor - Hi I have current dell laptop with intel processor .I has become old and wish to purchased new one .i wish to try one with amd processor .Which one would be good amd processor from there current generation ryzen 3/5/or 7 .I am not into gaming much .it mostly going to used for learning and […] |
SQLServerCentral.com Website Issues |
Why is the topic I'm trying to start not posting? - I have a very challenging issue with integrating a CLR on a new MSSQL17 server i'm migrating to. I've written a very detailed topic regarding the issue seeking expert advise from the members here, but for some reason my topic never shows up. I was trying to post it in the SQL Server 2017 - […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |