I'm new to SQL. I have a table called management. I'm trying to write a query like below: SELECT ...
I am working on a project that has the following workflow: A procedure is written to spit out an...
I have a table with various column which i need to de-dupe, however i need to keep the existing...
In my project I have 2 layers. I have mentioned below. I need to sum the minutes between two...
I have table ** Table:** MTID code boxnumber 1 10-01 10 1 10-02 10 1 ...
I have a temp table that stores bit columns. I want to do a null check for these columns and make...
--Drop the table if exists drop proc if exists test_sp use testdb go create procedure...
I have a query that contains duplicate records due to deals that have been cancelled; in some cases...
I have a question about SQL Server: how to get required output based on below table data? Table:...
I am trying to extract a pattern from a SQL column , the pattern is not always same it may vary...
Deadlock Issue in Production environment. Not able to simulate in DEV.Below the log from PROD. Any...
This question already has an answer here: Is floating point math...
--Drop the procedure if exists drop proc if exists [Sp_TestA] CREATE PROCEDURE [dbo].[Sp_TestA] ...
I have two dates in the same column and I need subtract the days/hours between them. SELECT...
I have data that looks like this. I want to pivot it to look like this. I'm testing the SQL...
I am using SQL Server in Visual Studio 2010. I set up a report which grabs a list of all IDs that...
I have to compare a row (in Table1 and Table2) with columns (Employee, Place from Table3) and check...
My question is related to this question. However I am writing a clean scenario on which I need...
I ran the following script to try to get all tables in my DB exported (trying to backup the data in...
Table data and expected data as below I wanted to select the distinct ID and Name, irrespective...
I am having a database table named traveller_info in SQL where I have columns...
I am using the Enterprise Version of SQL Server 2008. I am wondering if there is a way to export...
Thank you in advance for answering this question, and I will accept tips on improving my question...
This question already has an answer here: SQL Procedure has no...
I'm facing a strange problem with sp_send_cdosysmail OLE Automation. I have a store procedure that...
I have a Input table Header DisplayName Field1 EmpName Field2 EmpID Field3 ...
I need to create a report and I am struggling with the SQL script. The table I want to query is a...
I have actually built an application using C# to do differential backup with compression option on...
I use SqlConnection in C# and I open the connection with sqlconnection.Open() to a VM were MSSQL...
I have a query as below: select a.person_name , f.speciality, a.email, a.phone, ...