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 2005 Forums
 Transact-SQL (2005)
 Select statement to output two linked tables

Author  Topic 

amerbashoeb
Starting Member

14 Posts

Posted - 2010-01-18 : 20:53:03
Hello there,

I having been sitting whole day to figure out how to write a sql query to display result in the following manner.

CategoryID
1
ArticleID Title CategoryID
1 fried rice recipe 1

CategoryID
2
ArticleID Title CategoryID
2 party at tiger club 2
3 party at zebra club 2
4 party at lion club 2

CategoryID
3
ArticleID Title CategoryID
5 how to spend money 3
6 how to save money 3

I am sure there is way in sql to do this?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-01-18 : 21:42:43
Do that type of formatting in your application or report.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

amerbashoeb
Starting Member

14 Posts

Posted - 2010-01-19 : 06:12:33
thank you Kizer
Go to Top of Page
   

- Advertisement -