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
 SQL Server Development (2000)
 How can be written that query?

Author  Topic 

muratcan1
Starting Member

3 Posts

Posted - 2007-06-19 : 03:41:29
Hello, i have a titles and topics table. i want to get data like :

title_id----title_name---topic_name--topic_title_id
1-----------title1-------null--------null
null--------null---------topic-------1
null--------null---------topic-------1
2-----------title2-------null--------null
null--------null---------topic-------2

is that possible? if not how can do it in an effective way?
i need to list them on my page group by group

Please help.
Thank you

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-19 : 04:02:48
Can you post your table structure with sample data and the corresponding result that you want ?


KH

Go to Top of Page

muratcan1
Starting Member

3 Posts

Posted - 2007-06-19 : 04:09:29
there are some topics under titles for example

titles table
title_id title_name
1 Internet
2 Programming

topics table
topic_id--topic_name topic_title_id
1---------TCP/IP----------------1
2---------Network Communication-1
3---------Internet History------1
4---------Visual Basic----------2
5---------Tips/good programming-2

In fact, I need to list them on the page like that:

title1
-its topics
-its topics
-its topics
title2
-its topics
-its topics
-its topics

I wonder can be done with one query?

Thank you.
Go to Top of Page

muratcan1
Starting Member

3 Posts

Posted - 2007-06-19 : 04:51:44
please help, i really need.

thanks a lot
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-19 : 04:56:37
take a look at this
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=15499


KH

Go to Top of Page
   

- Advertisement -