Parent: public class Currency { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public string? Name { get; set; }
I need help with writing the query that will say month difference between return and purchase dates, see the example below. Product PurchaseDate (dd/mm/yy) Ret
Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. Output one of the following statements for each record in
I have a scenario where during an Update request of a parent entity, I have a collection of children entities in my dto, and want to merge them in the DB so tha
In my R script for MS SQL Server I try to return one column VARBINARY() and one VARCHAR(). However, server allow only one column when VARBINARY is returned: T
I've been running a schema compare in a database project in Visual Studio 2017, when I do this I get the following message in the Error List tab: Unexpected
I have a query like this return await _ctx.Activities .Include(a => a.Attributes) .Include(a => a.Roles) .Include(a =
I'm trying to perform a PIVOT but getting an error. I'm trying to see which patients have more than one Interval session. The column is a text type. I attempted
I am trying to learn how to use transactions and error handling. Got stuck with custom error messages. The stored procedure generates badges for AdventureWorks
I'm studying of Azure Synapse. In dedicated SQL pool database, 'actual execution plan' of SSMS was disabled. In serverless pool database, SSMS says 'set statist
I am trying to run a query to return all rows that are not null. But, I am not able to get that done. How is this possible? Please assist.
I have this sample table +--------+-------------+ | DBName | Description | +--------+-------------+ | A | Car | | A | Boat | | B
I am making merge upserts to my data warehouse. I don't need to keep the history on this particular object, so I'm using a type i slowly changing dimension. I'm
While connecting to SQL Server database by attaching to an MDF file, the following error is returned: The database cannot be opened because it
I have these two SQL tables: Bills (BillId, Folio, Date, ProductId) BillsRows (BillRowId, BillId, ProductId, Lot, Quantity, Price) ProductId is optional in Bil
I have a SQL script with a function (function drops at the end of the script) and temporary table definitions and variables to process the data that gives me on
I want to establish a MSSQL Connection from Ubunutu 18.04. It was quite hard to get this set up, but know it works so far that I can use sql_srv class or pdo cl
I am running into an issue where my .net application (C#) will not connect to SQL Server when ran by a domain user. Exception is: The underlying provider faile
I have a query with a few columns. I need to find the avg of a particular column and then use the average value to calculate other values. I am finding avg with
I have the following connection string in ASP.NET Core, but I get the following error: Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open dat