Laden...
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
My New Resolution | |
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) |
Hiding Your New Year's Age There is a table that has everyone's date of birth stored in it. The column is dob and it is a date type. This column has the default function applied to it to prevent non-privileged users from seeing this information. If a user without UNMASK ones this query, what do they see as the result? SELECT DATEDIFF(YEAR, dob, '2022-01-01') FROM dbo.Guests AS g WHERE g.Guestname = 'Susan'Answer: 0 Explanation: The default date value is 1900-01-01, but masking will cause the function to return a 0 here. Ref: Dynamic Data Masking - https://docs.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-masking?view=sql-server-ver15#defining-a-dynamic-data-mask |
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 |
Can I safely force the plan without the table spools? - I have the query below that has had 2 plans since at least Dec 20th. On Dec 22nd, the plan with eager spool operators began to be used orders of magnitude more than the other plan. Those operators show up preceding non-clustered index inserts. For some reason, the other plan shows no indication of updating […] |
SQL Server 2017 - Development |
Multiple Date rows into One single Date row(date range) - Dear ALL I have a requirement of converting different date ranges into one single row, group by EmployeeNr. You can exclude CompensationNr and Payment Date columns, while writing the query. Following is an example of table and result i want it to be. Thanks. |
Development - SQL Server 2014 |
How to remove additional element from Nested XML - Hey everyone. I'm a bit new to XML and had an issue with some formatting. I'm nesting XML queries and it creates an additional element which I need removed. Here is a sample of what I'm doing. select PrintOrderNo as "@PrintOrderID" ,PayGroupID as "@PayGroup" ,( select LineNumber as "@DetailNo" ,CompensationDescription as "@Description" FROM Table1 […] |
SQL 2012 - General |
How to get data from table Compliance Data Based on PartId and ComplianceTypeId? - I work on SQL server 2014 I need to get data from compliance data table horizontally . based on part id and compliance type Id every part id will have one row per 3 compliance type every row per part will have 3 compliance type id 1,2,11 if part not have 3 compliance then it […] |
Encrypting SQL 2012 - I need some assistance, please. Now that TDE has blown up in our faces with SQL 2012, we are being pushed to use "native SQL encrypti on" on our databases to ensure the data at rest is encrypted. This while we're in the middle of a migration to new https://showbox.tools/servers. Does anyone know what […] |
SQL Server 2019 - Administration |
Install SSIS - Hi I am getting this error when i try to install SSIS: MainViewModel.OnBundleAction: Bundle action failed: The requested metafile operation is not supported (0x800707D3) I am downloading and installing this file: https://marketplace.visualstudio.com/items?itemName=SSIS.SqlServerIntegrationServicesProjects I already installed Visual studio 2022 and I am running SQL Server 2019. Do you know how I can fix this error message? […] |
Creating master key on test server in order to install backup encryption - We encrypt our database backups. We've installed some new client servers and I was able to create the encryption certificate on Production and Staging however when I try to create the master key on our test server I get the following errror: Msg 33094, Level 16, State 9, Line 1 An error occurred during Service […] |
polybase - Does big data cluster has any relation with SQL Server 2019 polybase? |
SQL Server 2019 - Development |
CASE statement and partition by - Hello everyone, I have a question if someone may know how to adjust the code correctly. I need just to edit the last outer SELECT statement. I need to change the partition by DMDUNIT, I need outer CASE statement to look at 2 columns: 1) Start Date - if we have 3 distinct weeks worth […] |
Using OPENDATASOURCE as an ad hoc Linked Server - I'm not sure if this should be posted here or not, but I will try. We have a configuration where multiple customer databases are distributed across several servers. On occasion (not frequently), it is necessary to compare data between two databases on the same table utilized by the application. Because there are several Servers […] |
BCP adding carriage return/new line every 2034 characters - I have an SQL query that creates a JSON output. The query works properly and gives me the output I expect when I manually run it via SSMS. When I run it in a BCP command from an SP, the BCP utility is adding carriage returns and new lines every 2034 characters. I can open […] |
Interpolation/Extrapolation - Hi everyone I am trying to use linear and cubic spline interpolation/extrapolation to fill in missing rates. I have never done this before in SQL. What is the most efficient way to do this? Thank you |
Show data that takes into consideration data of consecutive weeks - Hello everyone, I have such a situation. I need to only show items that have had 3 consecutive weeks of over or under forecast or Bias. I am trying to understand how I can i can filter data taking into consideration consecutive weeks. If someone may have any ideas, I will appreciate... SELECT COALESCE(f.[LOC], a.[LOC]) […] |
General Cloud Computing Questions |
Hi. Most cheap PERSONAL cloud computer? At least 8gb RAM - I am testing Vagon.io, but it is somewhat expensive for me. Does anyone know of any other cheap alternative? I think the best thing would be to pay per subscription and not for what you use. I would be willing to pay something like 7 dollars one week and be able to use as many […] |
Integration Services |
Script Task issue during SSIS migration from 2016 to 2019 - SSIS migration from 2016 to 2019 We migrated our SSIS environment from 2016 to 2019. We have several SSIS packages that have vb script tasks. Once we migrated we tested some of these packages and they worked fine. However there are some older packages that are failing when they run. The initial error was : […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. [email protected] |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...