Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 group records

Author  Topic 

sign_seventh
Yak Posting Veteran

66 Posts

Posted - 2007-06-21 : 23:47:30
sample query results:
cid cno cvalue
--- --- -------
835 201 add edit
835 201 add edit
836 202 with VAT
836 202 with VAT

how can i filter this more into this:
835 201 add edit
836 202 with VAT

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-06-21 : 23:49:14
Select distinct cid, cno, cvalue
from tablename

(OR)

Select cid, cno, cvalue
from tablename
group by cid, cno, cvalue

--------------------------------------------------
S.Ahamed
Go to Top of Page

sign_seventh
Yak Posting Veteran

66 Posts

Posted - 2007-06-22 : 01:32:23
ok thnx a lot
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-22 : 08:40:04
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -