Laden...
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Third Party VDI Backup | |
I am using a third party backup utility that creates backup files from the VDI interface. I install this utility as a sysadmin and it adds extended stored procedures to SQL Server. I then change the software to use a lower privileged login that has db_backupoperator set in each database. Will the backups run successfully? | |
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) |
Concatenating Dynamic SQL I execute this code on SQL Server 2019. Each of the tables has one row in it. What happens? DECLARE @SQL NVARCHAR(4000); SET @SQL = ' SELECT mystring FROM TableA;'; SET @SQL += ' SELECT mystring FROM TableB;'; select @SQLAnswer: I get the strings from TableA and TableB concatenated together Explanation: The += is valid code, and the unclosed quote gets closed on line 5. This returns the two strings concatenated. |
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 |
replace chain of function calls with better code - We have a scalar function that is used to add a specific number of business days to a date however to dev who wrote it has gone overkill on the use of it and crashed the ETL - it now never finishes. We have approx 75k records in the table in question and depending on […] |
SQL Server 2016 - Administration |
Last time user loged in or any jobs ran - Is it anyway to find out when is the last time login user or account was used? I am trying to clean up my logins |
Jonathan Kehayias's page split discusison - I was reading Jonathan's article about captruing page splitting article which I found very interesting so I went a ahead and tested in one of my dev server. I am following along the article and I see some DBs with page splitting problems. 2nd thing I did was created another session to capture objects. So […] |
Administration - SQL Server 2014 |
log file of primary replica database is full - Good Morning, We have AG configured. The log file of primary replica database is full. I tried to take log backup but it did not work. I tried to shrink but did not work. Please let me know how to resolve. |
In AG, the secondary database went into suspect state - Good Morning, In AG, the secondary database went into suspect state. I know that I need to set HADR OFF on secondary replica and remove it from AG. What should I do after this? Please help me with the fix. |
Development - SQL Server 2014 |
Is loop necessary? - Hi I'm not even sure if I'm thinking about this the right way... Nevertheless, the setup is to find the distance from a Pass to the previous Pass, where the calculation for Pass itself involves the distance. Is there any other way to do this, such as recursion? declare @T table(N int not null primary […] |
How to select records based on column value - Hi, I have a table that has a duplicate rows based on Id column. If an Id has multiple entries, I want to pick a row that has its branch value as 'head quarters' as first priority, else branch with 'regional' value should be selected. For the below sample data, output should be like this: […] |
SQL 2012 - General |
Reading a json file - I have one query at the top that returns data (see text at bottom stored in a .json file actually) but the second one returns only the headers: -- this one works to bring in data unformatted on just one cell: SELECT * FROM OPENROWSET (BULK 'C:\Users\mwendel\Desktop\Colors.JSON', SINGLE_CLOB) as j --------------------------------------------------------------------------------- -- The one below […] |
SQL Server 2019 - Development |
Extracting a Median Date out of a Group of Records using a Query with NTILE - Hi there I have a table of data readings which I am able to use NTILE to sucessfully extract the MinValue, MaxValue and Average Reading Value using the following query: ;WITH cte_ntile AS ( SELECT *, NTILE(2) OVER(ORDER BY ReadingDateTime asc) AS [Group] FROM SIDataGroup ) SELECT MIN(ReadingValue) AS MinValue, MAX(ReadingValue) AS MaxValue, AVG(ReadingValue) AS […] |
Calculate count of credit decision (One or multiple custom sql) - Hello All, Hope you guys are doing good. I have a requirement to take a count of decisions in the below format from the “credit decision” table. Please find the credit decision table and expected report format. I am going to use this custom sql in tableau to generate the report/dashboard. The business user triggers […] |
Issue with joining the tables correctly - I have such a difficulty. I want every record every record in WHSIBLM where IBONHD is not 0. But I only want to limit the data in the WHSDMQT table to only bring in records where the mdmovt ='SKR'. I'm afraid my where statement is limiting the WHSIBLM data to only those items that have […] |
Azure Data Lake |
What is the main difference for a Azure data lake and a simple sharepoint folder - Hello, I'm trying to understand the main difference between connecting power BI to azure datalake vs connecting to a sharepoint folder structure? My company is about to start using power BI for analytics purpose, and we are currently looking into possible ways to store our data. At an old company we just built our own […] |
Reporting Services |
SSRS Hexadecimal 0X0B error - Hi Everyone, I am new to SSRS, I have a question I am creating report template in SSRS using “Microsoft Report Builder” for archive projects where I am connected to SharePoint Archive Site. SharePoint "Project" list has Justification Text column (multiline text), when I am trying to retrieve Justification data I am getting “Hexadecimal 0xOB” […] |
Change Excel Download column format to Text? - Hi, Having an issue where the default column format is General for downloading to Excel, but was hoping I could change it to Text so I can download and send without touching the spreadsheet. Is there some rendering code I could add to download type? Thanks |
Design Ideas and Questions |
Users and users subtype entities - Hello, I system requirements I have are as follows: In my app,as far as person entities, let's say I have users, adults, children, parents, friends, artists, customers, businesses, employees, event participants. The App it is basically like a social media platform with e-commerce functionality(ie: users create an account and can connect with "friends" or other […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. [email protected] |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...