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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Sql Query Help

Author  Topic 

saidev
Posting Yak Master

101 Posts

Posted - 2006-08-02 : 11:40:40
I have to use group by inorder to get the data from two tables(Table1 and Table2). can you guys help me with the query.

Table1 Table2

Month Name

Jan Name1
Feb Name2
Mar Name3


All i want is i need to group by all the names for "Jan" , "Feb" and so on.


Expected Result is

Month Name
Dec 05 Southwest
Dec 05 Phoenix Suns
Dec 05 NESN
March 06 West 2
March 06 MSG
March 06 Yes Network





madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-08-02 : 12:06:17
Dod you want to concatenate the names?
Post your expected result

Madhivanan

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

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-08-03 : 11:16:26
Do you want to return data in order of month names?

Try

Select columns from yourTable
Order by monthName

Madhivanan

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

- Advertisement -