I am counting 7-day active users using T-SQL. I used the following code: SELECT *, COUNT(DISTINCT [UserID]) OVER ( PARTITION BY [HospitalID],
I am having an issue upgrading our existing 2017 SSIS packages to 2019 . I have updated the target server version in the package settings and we have installed
I wrote a stored procedure in SQL Server that gets passed 4 parameters. I want to check the first parameter @table_name to make sure it uses only whitelist char
I have a table with a varchar column categoryIds. It contains some IDs separated by commas, for example: id categoryIds -------------------- 1 3,
CREATE PROCEDURE SPCheckDirectoryExists ( @chkdirectory as nvarchar(4000) ) AS SET NOCOUNT ON BEGIN DECLARE @folder_exists as int DECLA
I use standard driver com.microsoft.sqlserver.jdbc.SQLServerDriver to connect to a MSSQL server. I run my program in Eclipse and encounter error: Failed to obta
I want to generate an ER diagram of an SQL database using Microsoft SQL Server Management Studio (SMSS). However, I don’t know how to. I found this techni
I have got a problem with database queries, when I try to run them from my groovy script. Sometimes, but very often, I've got an error: com.microsoft.sqlserve
I have following queries: DECLARE @application_number CHAR(8)= '37832904'; SELECT la.LEASE_NUMBER AS lease_number, la.[LEASE_APPLICATION] AS applicatio
So I have a DataGridView called MyMovieDataDrid which is connected to a sql server, and I already have my IsDeleted property, and a delete repository which is s
I have a WinForm application developed on one laptop connected to an SQL server on the same laptop. I have a new laptop and have created a docker setup for an S
I want to save new record in SQL table. one of this table field is "username" that I want to add record by using session and other fields are
Could you guide me on how to view the current roles/permissions granted to any database user in Azure SQL Database or in general for a MSSQL Server instance?
The purpose of my application is when a user types in a customer, their username and a message into the respective textboxes, it's supposed to be recorded into
My audit trigger,shown below, works great except that I am required to record who exactly made the change. As written the system user field was supposed to do t
I have database size is more than 125 GB . and every 1 hour the database is not respond . the message is every time say (The transaction log for database MESP_2
I have the following data set: which is daily sum. Based on this, how do i get last 7 days sum, 14 days sum and 21 days for each row in new columns. I have trie
say I have 3 values, Bill, Steve, Jack. and I want to randomly update a table with those values, eg Update contacts set firstname = ('Bill','Steve','Jack') whe
I have some WKT/WKB data in the MSSQL server like this and would like to show them on the map with the help of leaflet, Openlayer, OpenStreetMaps, or GoogleAPI.
I have a task to remove a JSON property saved in a SQL Server database table's column. Here is the structure of my table OrderId Name JSON In the JSON c