Questions tagged [sql-server]
Microsoft SQL Server is a relational database management system (RDBMS). Use this tag for all SQL Server editions including Compact, Express, Azure, Fast-track, APS (formerly PDW) and Azure SQL DW. Do not use this tag for other types of DBMS (MySQL, PostgreSQL, Oracle, etc.). Do not use this tag for issues on software and mobile development, unless it is directly related to the database.
I'm creating a Library Management System and in the database I want to display book ISBN, Title and No. of copies of each book with their located library.
Here's the code I tried :
CREATE VIEW ...
Friends, I have a dormitory automation project, I want it to increase the number of active people by 1 when enrolling in the rooms section, and reduce it by 1 when the person is deleted from the room, ...
How to copy new data from one table to another table in SQL.
Example:
There are 4 rows in one table and then we added 2 more rows now how to copy that two rows only from one to another table, we don't ...
I am using SQL SERVER 2016.
The Child Stored Procedure looks like below.
CREATE PROC [dbo].[usp_InventProduct_Test]
@FilterDate date,
@Schema nvarchar(100),
@RolloutName nvarchar(100),
...
I am working with Drupal 8.9.11 and Microsoft-SQL and Nginx
I installed the Event Log track Module using composer
this module has many Sub-Modules like Event Log track File, Event Log track User ...
I can detect duplicate records, but when I'm inserting new data it will detect it as a duplicate record even if doesn't already exist.
Here is my code:
ALTER TRIGGER [dbo].[SDPRawInventory_Dup_Trigger]...
I want to make this "month_no" field autofill, when the user sends or inserts data in the previous field which for_month as the month in string format I want month_no to be filed ...
I have 2 tables in Database
I want to fetch the records except (sales=0 && quantity-0) from sales table and (stock=0 && quantity=0) from stock table.
Using the select query with ...
I have time like 25:00:00, 10:00:00, 30:00:00 and I want to calculate the sum of the values from database. How can I do that the current query for calculating sum is
SQL query:
SELECT
CAST(FORMAT(...
I would like to run a query to release the space held by XML parsing created by sp_xml_preparedocument before the session is killed. My code is like:
DECLARE @idoc INT, @result XML
SELECT @result = ...
I have a dataset(one column , multiple rows) mentioned below. I want to transpose first 5 rows in columns - 1st row, next 5 rows in 2nd row's column and so on. Can anyone help me with SQL query to ...
asked 5 hours ago
user1254261
13222 gold badges22 silver badges1212 bronze badges
I have tried to install SQL Server command-line tools, but I get the next error
sql-tools unixodbc-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
This is my query
select *
from RDR1 A
where Year(A.shipdate) = '2021'
and (
Month(A.shipdate) = Month(CURRENT_TIMESTAMP) - 1
or Month(A.shipdate) = Month(CURRENT_TIMESTAMP) + 1
or Month(...
I am trying to connect to a mssql database which is hosted on localhost via PHP code. In a browser (either firefox or edge) I run: "http://localhost/demo.php" and receive this error:
...
I need to use SQL and Asp.net to make a system that sends the HTTP response / Request response to a site, shows the data retrieved from the SQL server and then, shows what they have received after ...