Click here to Skip to main content
15,868,016 members
Everything / Database Development / SQL Server / SQL 2017

SQL 2017

SQL-Server-2017

Great Reads

by E. Scott McFadden
This article explains how to create and use a self referencing key in a SQL Server Table.
by koolprasad2003
SQL 2017 new features

Latest Articles

by E. Scott McFadden
This article explains how to create and use a self referencing key in a SQL Server Table.
by koolprasad2003
SQL 2017 new features

All Articles

Sort by Score

SQL 2017 

8 Jan 2020 by E. Scott McFadden
This article explains how to create and use a self referencing key in a SQL Server Table.
29 Nov 2021 by Richard Deeming
Quote: cast(AddedOn as date) between DATEADD(DD, -1, '2021/01/01') AND '2021/11/10' That's a likely problem - calling a function on a column in your WHERE clause will make the query non-SARGable. Instead, use: AddedOn >= '20201231' And...
1 Mar 2022 by Jörgen Andersson
You need to update the table twice. First sort the table on City1 and City2 so ('Mumbai','Delhi',5000) becomes ('Delhi','Mumbai',5000). Something similar to: UPDATE citydistance SET City1 = City2 ,City2 = City1 WHERE City1 > City2 Then remove...
12 Nov 2018 by OriginalGriff
Don't store them in SQL server - store them as files (I'd use a GUID as the file name) and store the location plus the original filename in SQL. That way, you aren't clogging SQL with unnecessary data, using up huge amounts of SQL server bandwidth, and you make it easier to back up the whole...
28 Feb 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
11 Mar 2022 by Richard Deeming
This is one instance where a cursor[^] is probably the best option. DECLARE @d date = EOMonth(DateAdd(day, -1, GetDate())); DECLARE @SNo varchar(20), @Start int, @End int; DECLARE range_cursor CURSOR LOCAL FORWARD_ONLY STATIC READ_ONLY ...
29 Sep 2023 by OriginalGriff
It really depends now how you wrote the original application - if it's organised as separate modules: Presentation Layer, Business Layer, and Data Layer as separate Assemblies for example then it should be pretty simple to just respecify the PL...
12 Nov 2018 by terzasek
Now I am considering options to store the documents on the server I'll have PDF documents mostly around 1 Million or so,those will store into a SQL Server table I am aware that I will reach the 8TB, I'm not sure about limit .mdf size of SQL Server Enterprise edition. After the PDF files are...
29 Nov 2021 by adhikar patil
Hello All, I have following table structure with more than 10 lakh records and i want to find out MAX Rainfall by every day with group by AWS_Id and AddeedOn as Date. I have tried but gives me error like Execution Timeout Expired. The timeout...
11 Mar 2022 by kirthiga S
I'm having Range table with values Eg: Sno Start End 1 1 25000 2 25001 49999 3 50000 74990 4 74991 99985 I'm using dynamic query to Execute stored procedure based on range table values. Eg: select 'Exec MainScript...
6 Apr 2022 by Dave Kreskowiak
Reposting the same question will not change the answers, nor absolve you from actually thinking about what your code is doing. There is only one place in that line of code where you're converting something to an integer, then you're casting that...
6 Apr 2022 by OriginalGriff
Look at the Show_Customer_Image method, and see what it returns. That'll help you work out what the Row[0][0] cell is, and if it's actually a byte array. Use the debugger - it lets you look at the data while your code is running. Hint: it isn't....
2 Oct 2023 by Solution Hall
I built a real-time ERP software for a client that has been running since the last 3 years. The front end of the project is a Windows Forms desktop application built in VB.NET (in Visual Studio 2017). And the back-end is in MS SQL Server 2016. ...
18 Aug 2019 by koolprasad2003
SQL 2017 new features
1 Mar 2022 by skcwebworld
drop table if exists citydistance create table citydistance ( city1 varchar(100), city2 varchar(100), distanace int ) insert into citydistance values ('Delhi','Mumbai',5000) insert into citydistance values ('Mumbai','Delhi',5000) insert...