Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
How to shrink LOB data in sql server 2017 - I have a huge table that stores pdf documents with datatype "image". Recently we started to offload files to blob storage, that is why we want to shrink main data file. All my tries to shrink the file wasn't successful. Usually, it stucks on 97-98% and doesn't go any further. Even shrinking by small chunks […] |
SQL Server 2017 - Development |
Blank space being imported during stored procedure - I have a stored procedure that imports a group of csv files. The first field is called Initial and it always has 4 characters but is set to VarChar (50) because there are some blank lines at the end of the file and it will fail the import with a truncate error if I dont […] |
Blank space being imported during stored procedure - I have a stored procedure that imports a group of csv files. The first field is called Initial and it always has 4 characters but is set to VarChar (50) because there are some blank lines at the end of the file and it will fail the import with a truncate error if I dont […] |
Behaviour of SSMS when scripting SPs has suddenly changed - Dear Experts I think this is an SSMS issue. My version is v18.10, aka 15.0.18390.0. Honestly don't know where best to post this - please advise if it is out of place. Until recently, when I right clicked on an existing stored procedure and selected Script Stored Procedure As > ALTER to > New Query […] |
SQL Server 2016 - Administration |
Linked Server Error - I have three node AG - 2 synchronous in one data center and the other asynchronous in a separate datacenter. A linked server has been configured for years and running without issue until all of a sudden recently. To add to the confusion, I'm only getting the error message on one of the synchronous nodes […] |
Development - SQL Server 2014 |
SQL Query Required - Dear All As per my request I have following input table Create table #FirstTable( StudYear int, StudValue varchar(20), SGPA float ) insert into #FirstTable values('1','Value1','5.6') insert into #FirstTable values('2','Value2','4.5') insert into #FirstTable values('3','Value3','3.2') insert into #FirstTable values('4','Value4','8.5') insert into #FirstTable values('5','Value5','6.5') I want Out put in following table structure Create table #OutputTable( StudYear int, […] |
AND syntax - Hello all, I am new to SQL, how to syntax 2 conditions connected with AND when trying to save value to variable? When I use code bellow there is no error but also no value displayed. SELECT @last_value = [VALUE] FROM dbo.TABLE_1 WHERE (IDMEASURE=(SELECT max(IDMEASURE) FROM dbo.TABLE_1) AND IDRESOURCE=27) PRINT @last_value |
SQL Server 2019 - Administration |
Log shipping broken after application upgrade - I have a weird situation regarding log shipping. We back up the databases on our production database server every hour, and then restore to our reporting server. This has been running for years. Last weekend, we upgraded our accounting system, and afterwards, log shipping stopped on the databases that the accounting system users. There is […] |
SQL Server 2019 - Development |
What am I doing wrong with this subquery? - I am trying to return all values from the lookup table to columns on the same row for the Diagnosis code. Here is my query: SELECT distinct a.accession_no as "Accession Number", (ISNULL((select m.code from medical_code m where ai.icd9_id = m.id and ai.sort_ord = 1), '')) + '~' + (ISNULL((select m.code from medical_code m where […] |
cursor not getting next values - I've built this cursor to build a new diagcode from all the values in the cursor. The cursor is working in the sense that it's looping, but it's not getting the next "code" or value in the list. What am I doing wrong? Note: I am selecting a list of codes. then I have declare […] |
populate a table with new data set but keep the original identity column values - I have a table like below, I would reset the values in the table with some fake addresses. I have already have the fake addresses ready without identity columns. But I would keep the original addressID in the table, so that other table use it as FK still works. Basically I want to keep the […] |
Looking at startdate of one table and calculate the numbers from a different tab - I have such a situation. I have a table UDT_CKB_SNAPSHOT where we have different events (promotions). I need to take these event names, start dates of those events. I have a 2nd table called FCSTPERFSTATIC where we have Actuals and Forecast. What I need to do is basically is to look at STARTDATE of UDT_CKB_SNAPSHOT […] |
Azure Data Factory |
How do I pause and resume a Synapse dedicated SQL pool automatically? - Hi All, How do I pause and resume a Synapse dedicated SQL pool automatically? If it is in ideal state can I capture that and pause synapse dedicated SQL Pool? Could you please suggest. Thanks in Advance!! Regards, Ashok Kumar |
Reporting Services |
SSRS Long Text 2 Column report with some variables - I need to design what looks like a simple report. However, it's 29 pages or so, 2-column, with a few variables mixed into the long text with various formatting throughout. It seems simple enough. However, I'm not sure how to even begin. I have the data set setup without issue. I also have my parameters […] |
Design Ideas and Questions |
Need some example or answer for this doc - Need answer or data sample for this exam CMSC424 - Database Design SQL Assignment (Parts A and B) Fall 2007 (TENNIS DB SCHEMA) I trying test some tennis db like this doc, if someone has example with data test sample for test. https://ufile.io/dih6vn9a |