473,413 Members | 2,051 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

sql query to find latest version of stored document

I have table having column which stores documentid and another column storing the version of document.I want query to find out the only the latest version of document?
can any one help
Apr 18 '14 #1
1 1472
NeoPa
32,556 Expert Mod 16PB
Something like this should do you :
Expand|Select|Wrap|Line Numbers
  1. SELECT   [DocumentID]
  2.        , MAX([Version]) AS [MaxVersion]
  3. FROM     [TableName]
  4. GROUP BY [DocumentID]
Apr 18 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
0
by: Eddy | last post by:
We have a somewhat large .net solution (25+ projects). All the developers using this solution have experienced at one time or another a "Get latest Version (recursive)" on the solution that has NOT...
1
by: Ralph Krausse | last post by:
What is the latest version of javascript? 1.2? Who manages this? NetScape? Who comes out with new versions? How does these changes get into Netscape and Explorer? How can I find what browsers...
2
by: Deanna Delapasse | last post by:
Can someone tell me how to get the latest version of C#? I've installed from the June 2004 dvd (69586-335-00000007-18273), but a coworker has a more recent C# (the last part of the version is 600...
0
by: Damien | last post by:
Hi, Visual Studio .NET 2003 Visual SourceSafe 6 (6.0d) I'm working in a three person team on a reasonably complex Solution - it currently consists of 9 separate projects (3 of them are plain...
76
by: kwilder | last post by:
This works, but it doesn't load the latest version of the xml if it was just modified without closing and reopening the browser. Here's the scenario: I have an xml doc called results.xml. It...
2
by: HeroinNO.4 | last post by:
Hello everyone! Now the latest version of free count down timer source code is available in http://www.fillweb.com/countdown.htm, you can open it in IE and View->Source to see the latest version...
5
by: Ellie | last post by:
Hi, I am now starting to look into upgrading our vb6 apps to .net and need to know the latest version I should be getting. Thanks
4
by: lsauravbi | last post by:
I have this first query which gives the mimetype and sum of their total datasize and count of number of document SELECT MimeType, SUM(DataSize)/1024 as Total_Size_MB,count(DocID) as Total_No_Doc...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.