|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
The FK Columns | |
I am searching in my SQL Server 2022 database for a list of columns that are used in Foreign Keys to help compile help for developers. Where do I query for the columns used in FKs? | |
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) |
Santa Fun Which of these T-SQL constructs suits Santa Claus? Answer: dbcc checkdb ('GiftRequestDB'), ORDER BY Naughty_Or_Nice, WHERE Behavior = 'Nice', OVER (PARTITION BY ChildName ) Explanation: Any answer works. Merry Christmas!!! |
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 |
Arctic Wolf flooding SQL error log - Hello experts, I am not sure if anyone uses Arctic Wolf for a security tool, but we recently implemented it and one thing it does is penetration testing and vulnerability scanning on our SQL Servers. Our IT team has this turned this feature on as they want to make sure things are secure, but it […] |
SQL Server 2017 - Development |
Query - ServerName DatabaseName DatabaseSize(MB) Date Server DBName Size Date A DB 110 6/1/2023 A DB 113 7/1/2023 A DB 118 8/1/2023 A DB 130 9/1/2023 A DB 120 10/1/2023 A DB 140 11/1/2023 A DB 143 12/1/2023 A DB2 1110 6/1/2023 A DB2 1113 7/1/2023 A DB2 1118 8/1/2023 A DB2 1130 9/1/2023 A DB2 1120 […] |
SQL Server 2016 - Administration |
emergency!!! RecoveryPending how to fix it? - How to fix Recovery Pending State in SQL Server Database,please help |
SQL Server 2016 - Development and T-SQL |
housekeeping of millions of records on everyday basis - Hello!! We are building our system that will be up and running for 24x7 365 days. the data will be generated in millions each day. Kindly help with the best practices material where in we can implement smooth house keeping processes on each table so as to not to load the tables as well as […] |
send csv file or txt file to sftp server - Hello Can someone help me with code to send file to sftp server please: Here is my code: # SQL Server query $Query = "SELECT name from tblName" $SqlConnection = New-Object System.Data.SqlClient.SqlConnection $SqlConnection.ConnectionString = "Server=CWR-PP02;Database=testdb;Integrated Security=True" $SqlCmd = New-Object System.Data.SqlClient.SqlCommand $SqlCmd.CommandText = $Query $SqlCmd.Connection = $SqlConnection $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter $SqlAdapter.SelectCommand = $SqlCmd $DataSet = […] |
SQL Server 2019 - Development |
Get text from table and join with BIT column on table 2 - Ok, not sure how to explain this 100%. Here is the issue. I have 2 tables (can't post actual schema) and I need to determine if the value in table 2 is true if the value in table 1 exists. small snippet of the table schema: table 1 id int field varchar id field 1 […] |
Validation of special char and replace for the good one - Hello I need help on how to do this more efficient. I will need to write a store procedure to validate an address which contains special characters Address is like : Street : Las Ñipas 4264 So i need to remove the Ñ and replace it for N I was reading to use collate SQL_Latin1_General_CP1253_CI_AI […] |
Query to get the previous row from the row selected - Hi I have payroll detail table in which I have payroll details id and an employee id (foreign key from employee table). My requirement is, when a row is selected for a particular employee, I want to get the value from a the previous row. For example if I have 3 employees and each have […] |
How to write to a file from SQL Server running on Docker Container on Linux - So we have a SQL Server database running in a Docker Container on Linux There is a stored procedure which will take in JSON as a parameter and extracts data out into a table called dbo.BCPOutput Now I can run this from SQL Server Management Studio (in SQLCMD mode) :connect 217CAS -U sa -P xxxxxxx […] |
SSRS 2012 |
SSRS Open link in new tab - Hello! I have a report that lists all reports in folders on the report server, if you click on the report name I want it to open a new tab with that report. So I am not sure where I am going wrong. I am building my URL link to other reports on the server […] |
Analysis Services |
Help on Aggregation - Recently started SSAS. I have a Date Dimension, Day --> Month --> Quarter --> Year and a simple Sales Fact table. I want to calculate the percentage and aggregate only if the percentage is => 75% (please see image) on the DimDate Hierarchy. So below (showing Quarter to Year), the Q3 of 60% shouldn't be […] |
Calculated Time Periods Hierarchy - Please help me understand why I am getting the following error: "A set has been detected that can't contain calculated members." I have Attributes "Dates" and Hierarchies "Calendar" (YearID/QuarterId/MonthId/dtDate). I've created Calculated Member a "Current Month" for the parent hierarchy «Dates.Calendar.[all]». CREATE MEMBER CURRENTCUBE.[Dates].[Calendar].[All].[Current Month] AS StrToMember("[Dates].[Calendar].[Month Id].&[" + Format(now(), "yyyyMM") + "]"), VISIBLE = […] |
Calculated Time Periods Hierarchy - please help me figure out why I'm getting the following error: I need to create Calculated Member for "yesterday", "current month", "current year", but but I keep getting an error message please help me figure out why I'm getting the following error: "A set has been encountered that cannot contain calculated members." I have Attributes […] |
SQL Server 2022 - Administration |
Moving database servers - IP address change - listeners - Hi, We will be moving our physical database servers to a new location. Prior to the move, new IP address for all the SQL servers will be changed/updated. Are the IP address listed above for the cluster server? After the servers are moved will I need to change the IP address for the […] |
SQL Server 2022 - Development |
Replication for archive server with longer retention period - I want to set up SQL Server transactional replication from a main SQL Server to an archive SQL Server. The archive will contain historical data and have a retention period much longer than the main server. Data will be purged by application code on both the main and archive servers, and the archive will be […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |