Tag: ssms

Counting consecutive days of absence greater than 60 days

I have this table called SickLeaves with Employee ID, the start and the end date of the sick leave. EmpID DateFrom DateTo 3022 10.10.2010 13.10.2010 3022 09.11.2011 10.11.2011 3022 11.11.2011 11.11.2011 3022 13.11.2011 17.11.2011 3574 01.11.2011 14.11.2011 3574 15.11.2011 26.11.2011 3908 09.11.2011 09.11.2011 2734 09.11.2011 09.11.2011 3054 16.11.2011 16.11.2011 3054 17.11.2011 17.11.2011 3054 18.11.2011 18.11.2011 […]

How do I BULK INSERT shared text files from MS OneDrive for Business into SQL-Server?

We are writing a bunch of data (text files, images, MS Excel spreadsheets) to a laptop and we want to share the data among several different team members. The University has MS OneDrive for Business for free so we are using that as our file sharing system (our personal DropBoxes are all full!). We’ve successfully […]

Unable to copy large column containing JSON data from result of select query

I have one table TreeVersions in SQL Server which has one JSONTree column having large tree JSON data. Now I have run select JSONTree from dbo.TreeVersions where Tree_Id=1, I get result for tree 1. But when I copy the JSONTree column from the result, it does not get me the full result. Can anyone tell […]

Unable to save SQL Server maintenance plan

We have a maintenance plan for backing up databases and I need to change the destination filepath. When I open the plan in SSMS and make the changes then hit save, I get a message that says You are about to save maintenance plan “mtpblah” in a new format. Earlier versions of SQL Server Tools […]

Executing multiple stored procedures is causing an error

Something really weird is happening with me with SQL Server Management Studio. I created a stored procedure and then I execute this stored procedure (in a row) using different parameters on each call. Then I get an error like I am trying to insert a value in a table using the same primary key, this […]

How do you retrieve multiple SSMS query error messages from a Java Exception object in a catch statement?

I am developing a JSON Exception HTTP response builder based on error messages from executing a select query in SQL Server Management Studio. I have a try/catch block with the select query execution happening in the try and the response building with exception message happening in the catch. My problem is that my exception response […]

T-SQL code snippet with time of insertion

I have a question concerning the code snippet functionality in MS SQL Server Management Studio. I want to create a snippet that will contain the current date and time in some predefined place of code at the moment when the snippet is added. Not when the whole script will be executed, hence GETDATE() won’t satisfy […]

COALESCE working in only one case

I am trying to update an ERP software and I block on a syntax in a table made with PIVOTS Let me explain, I would like in my table (which is functional) that all NULL values ​​be replaced by a 0. In another table almost identical with the same syntax I succeeded but in the […]

SQL Server Management Studio provider string MS Access 2016

I need to make Access 2016 a linked server to Microsoft SQL Server 2014. I have downloaded and installed AccessDatabaseEngine_x64, and can find and select it in the “Provider” dropdown box on the “New Linked Server” dialog box, as seen in the image below. “Product Name” and “Data Source” are also entered correctly. However, I […]

Is there a way to restore specific table/column data without a backup?

I accidentally updated 2 columns across all rows in a table. Is there any way to revert the data? I dont have an archive of this table.

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.