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
I am experimenting with Maui Blazor. I want to connect my application with an SQL server database. Therefore I used a simple Sql Connection String. When I test
Currently I am working on SQL Server 2000,2005 & 2008, my requirement is like, the database available in SQL Server 2000 & 2005 will be available in 200
I have two tables. Both tables contains an ID that can be used to join them together. However, table 2 can have more than one row for the same ID. Table 1 will
How to write a query to just determine that the values in a column are unique?
I have 2 commands and need both of them executed correctly or none of them executed. So I think I need a transaction, but I don't know how to use it correctly.
I'm following this guide. Mssql-django and I have Django version 3.2.12 I already installed mssql-django 1.1.1 I also have pyodbc 4.0.32 modified my settings.py
I have a table where all columns are auto-populated whenever an insertion happens: CREATE TABLE … ( ItemID INT NOT NULL IDENTITY(…
I really don't care what I do with this test database...it's for sandbox testing (attached to a production server instance)! All I'm trying to do is KILL all co
I have an application that is hitting an API. As such, it does a query for all ID's in the object, and then has to query each item one at a time per ID. I'm d
The Point: I want to be able to create a directory on the filesystem through a non-sysadmin SQL user. I'm creating a web front-end for a deployment script whi