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.
| Author |
Topic |
|
rahulmalhotra26
Starting Member
23 Posts |
Posted - 2008-01-25 : 04:37:45
|
| guys just a small help .. i am selecting columns and i dont want to put them in group by clause,,for integers i can useselect max(salary), account no from tablename group by accountnothis works but in case of varchar what can i use, so i dont have to declare the column in group by?? for example for column like last_nameRahul |
|
|
sunil
Constraint Violating Yak Guru
282 Posts |
Posted - 2008-01-25 : 04:56:37
|
| What are you trying to achieve. Provide some DDL,sample data and explain what you want from that data.Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-25 : 09:17:42
|
| This can be achieved in number of ways by using subqueries,aggregated functions like MIN,MAX,using DISTINCT,derived tables etc. It depends on your requirement. So as suggested post your table DDL,sample data and expected output to get quick soln. |
 |
|
|
|
|
|