
February 8th, 2013, 05:57 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 1
Time spent in forums: 21 m 9 sec
Reputation Power: 0
|
|
|
table related returns products duplicated and once
Hi, i am using sql serveer 2008, and i have this problem
I have 2 tables:
Table: products
id_code int PK
name_prod varchar(20)
Table:versions
id_produto int
version int PK(id_produto, version)
i need to show the list of products with the latest version.
i made this
select distinct id_code, name, max(version) from produts
left join versions on id_produto = id_code
group by version
but don't work...
any idea?
Thanks in advance
Last edited by marcobranco1975 : February 8th, 2013 at 09:49 AM.
|