Tag: ssms

EXEC an INSERT with a dynamic Schema TSQL SSMS

I know that’s a little bit much, but I’m searching for a solution since 4 days. I just want to EXEC a INSERT, but I always get some cryptic Error Messages in SSMS INPUT(variables are wrong so the ErrorLog should get filled): USE [Tfs_GitInterface] GO DECLARE @return_value int EXEC @return_value = [dbo].[spInsertChangeLevel2] @repositoryName = N’asdasd’, […]

When a SQL job starts, what is the value of @@ROWCOUNT?

I have been looking for an answer to this question, but I believe it may be a useful piece of information for others as well. I am working with TSQL in SQL server management studio. Due to the way our system processes information, it’s desirable to do updates in smaller batches. A trick we use […]

After Installing Visual Studio 2017 I am unable to debug in SQL Server Management Studio (SSMS)

After Installing VS2017 I am unable to debug queries in SQL Server Management Studio 2012 (SSMS). I keep getting the error: Unable to start program ‘MSSQL:://YOUR_SERVER/YOUR_DATABASE/sys/=0’ A Visual Studio DLL, coloader80.dll, is not correctly installed. Please repair you Visual Studio installation via ‘Add or Remove Programs’ in Control Panel. If the problem persis, you can […]

2 tables – Select a row from different table when column value changes

This is in MS SSMS 2016. I have two tables – SHIPMENT_HEADER and SHIPMENT_DETAIL. SHIPMENT_HEADER shipment_id | customer | ————|————| SH001 | cust1 | SH002 | cust2 | Shipment_detail has similar columns SHIPMENT_DETAIL shipment_id | customer | item | requested_qty| ————|———-|——–|————–| SH001 | cust1 | item1 | 2 | SH001 | cust1 | item2 | […]

SSMS Plugin for making keywords all caps

Is there a SSMS plugin for automatically converting T-SQL keywords into all caps? Preferably, one that converts as I type. Holding the shift key or toggling caps lock is a pain.

SSMS New query tab not showing spid

My SSMS; Other SSMS; Not showing spid and not showing execute query. Tool>Options>Editor Tab and Status Bar> All True Thank you advance.

What is the relationship among ';' / 'GO' / Transaction in SQL Server

I understand well of T-SQL Transaction, begin trans, and eventually rollback or commit. However, what is batch level? and what does these operators do? ‘;’ and ‘GO’ What is the relationship among the 3 terms?

Make Unique int column that allows NULLS in SSMS

How can I make an int column unique – on an existing table with data in – but allow multiple nulls – in SSMS. There are many records in the table now – and they all have NULL in this column now. I have seen ways to do this using a unique filtered index in […]

Microsoft SQL Server 2016 – SSMS, cannot expand tables for a database

There are many databases on my server, recently of them one (which I am the dbo on) has become inaccessible through SSMS. When I expand the tables node in ‘object explorer’ for this database I get the following error: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, […]

SQL Binomial Distribution/Arithmetical Overflow

I created a function for a cumulative binomial distribution. It works well for extremely modest sample sizes, but I get a arithmetical overflow on larger samples. The largest culprit is the n!. In excel 170! = 7.3E+306. 171! = #NUM! Excel has an internal function that calculates binomial distribution, and it works with ns much, […]

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