By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

How to build a query based on four tables

P: 3
hi , I was wondering if anyone might be able to determine a query based on these tables :I've created a database using sql server express 2005 of 4 tables :"BOOKS , AUTHORS , CATEGORIES and PUBLISHERS ".

I have to show what every author has in terms of books .
and I cant figure out how to do that !!!!
I want it to look somth like this:

author : elieeee
-----------------------------------------
book category book title
-----------------------------------------
comedy love
action woooow
drama I hate u



I appreciate any help possible :D
btw this is the query that i've use :""SELECT DISTINCT [category], [title] FROM [books] ORDER BY [title], [category] GROUP BY [ Author Name ]
Jun 30 '09 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
Yes. Use JOIN.

Good luck

--- CK
Jun 30 '09 #2

Atli
Expert 5K+
P: 5,058
Try a Google search for some tutorials.

See if you can make it work.
Let us know if you run into any problems with it.

P.S. we like code examples and error messages ;-)
Jun 30 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.