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 created a trigger to add date when insert record.
I worked fine when I inserted several records. However, it will not add date when I ran job with SSIS packet (over 20000 records).
I'm not sure ...
How do we get the previous year values in the current row.
id year amount
1001 2001 2400
1002 2003 3600
1003 2005 2300
1002 2004 1600
This is for a section in a unit test that I'm writing.
I am trying to say pass if any row in a column contains a certain string. So in words, what I want is "if the number of row that contain astring ...
So, I have been developing a .NET Core Web API application for sports results, teams, competitions, matches... You get the point.
Now, what I did not think of when creating entities is that I will ...
I have table Web.Log with column Properties which contains following content
<property key="ActivityId" />
<property key="UserName">John Doe</property>
I want to write an update query which joins 2 tables based on different Case conditions
Set ID = Case when T1.value1 < 0
then T2.ID ------Join on value1 between T2.valueTo ...
I want to insert data from a .txt file into SQL Server database, but I have a problem: it only insert the first line from my file, it doesn't insert the second and the next line.
How can I solve this?...
I have two tables like below in SQL Server 2017:
I want to show the missing [Y].[Name] for each X data.
I am quite new to SQL and my question is very similar to the problem posted in here. However, my Username and Date are in two different databases. Also, I'd like for the output I would like Date to be ...
I'm working on a stored procedure, and when I converted it back from a query to a stored procedure, it's complaining about "incorrect syntax near 0", or wherever the last line is if I comment things ...
I'm looking to create a report of sorts and am having a hard time wrapping my head around how this portion could be done with a single select in SQL (my experience is limited to a database course and ...
I am developing a Web API using ASP.NET Core 3.1.2 with Visual Studio 2019 v16.5.2.
My problem is when I try to create a controller for a database view model class, I get this message after ...
I have a customer table and order tables. In customer table we have 'Family link' column which is a given ID to each customer. e.g. familyLink: A121, if this customer has a family member in the table ...
I was tasked to upgrade some old SSIS packages from 2008 to 2012 and I have never done that before.
Most are upgraded automatically by the Visual Studio upgrade wizard, but one is failing and I ...
I might be not getting how some stuff work in Blazor, but here's what my issue is:
whenever I want to edit an object for example People object, I select it in @page "/people" from a table, then I'm ...