Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8694803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:52:22+00:00 2026-06-13T00:52:22+00:00

This is my current SQL query: SELECT ROW_NUMBER() OVER(PARTITION BY [Machine_ID] ORDER BY Version

  • 0

This is my current SQL query:

SELECT 
   ROW_NUMBER() OVER(PARTITION BY [Machine_ID] ORDER BY Version DESC) AS ROW, 
   MachineList.*
FROM  
   MachineList

Basically, I want to get distinct machine information. If several machines have the same ID, then choose the one with latest version.

However, SQL Server 2000 does not support the ROW_Number function. Is there any alternative for the SQL above?

P.S. most solutions I found on line are using temp table. But I could not use temp table because this query will be used in SSIS.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:52:23+00:00Added an answer on June 13, 2026 at 12:52 am
     select m.*
     from machinelist as m
            inner join (
                   select
                         t.machine_id, max(t.version) as version
                   from machinelist as t
                   group by t.machine_id
            ) as mm on
                  mm.machine_id = m.machine_id and mm.version = m.version
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<?php function f__table ($table,$cols,$order,$desc) { $comma=implode(,,$cols); $query = 'select '.$comma.' from '.$table.' order by
First off, here's my SQL query: SELECT research_cost, tech_name, (SELECT research_cost FROM technologies WHERE
I want to select previous and next row from table based on current id.
Consider the SQL query below: SELECT * FROM opening_hours WHERE week_day = WEEKDAY(NOW()) +
This is my current code: $wonAwards = $altdb->get_var(SELECT achievement_id FROM user_1 WHERE isTold='false'); Currently,
I'm a postgresql user and I'm trying to follow this : http://www.postgresql.org/docs/current/interactive/sql-createtrigger.html CREATE TRIGGER
What is current directory of shell script? Is this current directory from which I
I am trying to add a query in my current SQL INSERT INTO statement.
I currently have the following SQL statement: SELECT s.first_name, s.last_name, tgs.group_identifier FROM staff s
I have the below SQL query: SELECT g.name AS gname, COUNT(u.id) AS noMembers, f.name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.