Tag: ssms

don`t understand how trigger works

Trigger should react to deleting row from table Suppliers if there is some supplies in the table Supplies from this supplier, trigger should cancel deleting. This code allows to delete both, suppliers with supplies and suppliers without supply: CREATE TRIGGER SuppliersDeleteCondition ON Suppliers FOR DELETE AS IF EXISTS ( SELECT 1 FROM Supplies Ses JOIN […]

invalid parameter 1 specified for datadiff

I want to update field everyday automatically in database about duration. the formula is (due date – date now). I want to use sql server agent. But when I test the job its failed. USE FacilityMonitoring GO UPDATE [dbo].[klaim] SET selisihint = DATEDIFF (“dd”, GETDATE(), durasi_end) GO Query in SQL Server agent: Error:

Connecting to SQL Server Database using a Hosted Web Application

I have created a .net web application using c# that inserts, updates, and deletes data from an SQL server database. I have tested it using my localhost and it works fine. Now I would like to publish this application on a hosted site. My question is, does the database need to be on the same […]

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?

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