sql query [message #373545] |
Mon, 23 April 2001 06:45 |
arlo
Messages: 2 Registered: April 2001
|
Junior Member |
|
|
Bonjour
I've got a database which contains a lot of product/version such as:
product version
A 1
B 1
B 3
C 2
C 4
...
i search to have the list of all the product in their latest version, such as
A 1
B 3
C 4
Does anyone has an idea do this ?
|
|
|
Re: sql query [message #373547 is a reply to message #373545] |
Mon, 23 April 2001 08:04 |
Balamurugan.R
Messages: 91 Registered: March 2001
|
Member |
|
|
Hi,
Try this query
select product,version from table_name x where version=(select max(version) from table_name where x.product=product);
Hope this will help u.
Cheers,
Balu
|
|
|
|
|
Re: all seems working, Thanks to you all [message #373625 is a reply to message #373572] |
Fri, 27 April 2001 10:00 |
Balamurugan.R
Messages: 91 Registered: March 2001
|
Member |
|
|
Hi,
You told that ur database is very large, so
all the queries submitted to here took too much
time, so I have created another query, it will
take only few minutes to execute and solve your
problem. Try this query,
select product,max(version) from table_name
group by product;
Let me know it works well and it is useful to u.
With Regards,
Balu
|
|
|
sql server [message #374306 is a reply to message #373545] |
Tue, 05 June 2001 06:54 |
jegan
Messages: 2 Registered: June 2001
|
Junior Member |
|
|
We have tried to execute a sql query (select query) using sql server query analyser , it will return the records( 88 thousands ). But we were executing the same query in ASP page using recordset object open method and it is giving EOF.
Clarify this query as early as possible.
|
|
|