I want to group by one column, get both min and max of a second column, and (this is the tricky part!) get the value from a third column where the second column
Issue: You are given three tables: Students, Friends and Packages. Students contains two columns: ID and Name. Friends contains two columns: ID and Friend_ID
My SQL query runs perfectly, but when I add the CTE function, I get an error Please check this code and let me know what's wrong with the CTE: WITH Consumption_
I am new to the Xamarin platform, I have a local hosted database in SQL Server 2014 using php (with aid of XAMP server) and the table name ItemProductsDB and sa
I have a table containing graduate ids, degree titles and graduation years. The table can contain any number of rows for each graduate. I would like to create
My local environment is WAMP. For a few pages i have to access a remotely hosted MSSQL DB, run queries and get back results. I have been supplied the following
I am getting following error while attempting to execute the package. I can execute individual task successfully. But whenever attempt to execute whole package
Let's suppose I have a temporary table which looks like this: +----+------+ | Id | Value| +----+------+ | 1 | 1 | | 1 | 2 | | 1 | 3 | | 2 |
I've an windows app in server which collects data from db and renders pdf via another third party .exe and mails the pdf. I scheduled the exe to run on SQL job.
I cant open my SQL server configuration manager getting this error message: Cannot connect to WMI provider. You do not have permission or the server is unreach
For my unit tests I have an automated process which builds a copy of a DB, table by table. I first of all run a SELECT INTO and add the primary key and any indi
I'm currently investigating an annoying problem on my website. We're giving away prizes regularly on the website, but to enter the competition people have to lo
I have a string representing a batch number of goods, for example "0000AZA001B". I only need the "AZA001B" part. How can I achieve that in SQL Compact?
I have a MS SQL CTE query from which I want to create a temporary table. I am not sure how to do it as it gives an Invalid Object name error. Below is the whol
I'm trying to connect to SQL DB in my Maven project, but keep getting following exception: "com.microsoft.sqlserver.jdbc.SQLServerException: This driver is no
I have one SQL Agent maintenance job which checks the index fragmentation within a database and rebuilds indexes if required. This is running well in my test se
I'm trying to make a view. So far, I have written this: with ExpAndCheapMedicine(MostMoney, MinMoney) as ( select max(unitprice), min(unitprice) from
I have a table with a column like this that is currently live: name NVARCHAR(128) NOT NULL DEFAULT '' I am altering the column like this to make it nullable:
I hope this is an interesting puzzle for an SQL expert out there. When I run the following query, I would expect it to return no results. -- Create a table vari
I have created an application in .NET Core where I am trying with database first approach. I was able to add Migration using "Add-Migration InitialCreate" but