Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-22-2004, 01:54 PM   #1 (permalink)
Crow T. Robot
Registered User
 
Join Date: Nov 2004
Posts: 14
Crow T. Robot is on a distinguished road
Books database query

I have a simple program in which basically I must use the books database. Well, it would be simple except I don't know how to start it, and have virtually no SQL code to reference. Damn textbook doesn't give any.

The program must simply select all authors from the authors table, select all publishers from the publishers table, select a specific author and list all books for that author, including title, year, and ISB. The information should be alphabetically ordered by last name then first name. Select a specific publisher and list all books published by them, including title, year, and ISBN. Organize it alphabetically. This must all be done through predefined queries I make. And it must be displayed in a JComboBox. I know most of the GUI, though.

This is my focus now, but I'd appreciate it if I could get help on how to provide at least 3 queries.
Crow T. Robot is offline   Reply With Quote
Old 11-22-2004, 02:39 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,446
sde is on a distinguished road
i've read and re-read this, and i can't make sense of it. can you break up that paragraph a bit? do you need all that info in 1 query?
__________________
Mike
sde is offline   Reply With Quote
Old 11-22-2004, 02:50 PM   #3 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,140
Belisarius is on a distinguished road
Well, as for the first one, that's pretty trivial. Here's how I'd do it in PostgreSQL:
Code:
SELECT publisher FROM publisher_table ORDER BY publisher ASC;
Rename the column and table to taste.

Try slapping together the other two and post them if you think you need more help.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 11-22-2004, 04:21 PM   #4 (permalink)
Crow T. Robot
Registered User
 
Join Date: Nov 2004
Posts: 14
Crow T. Robot is on a distinguished road
Quote:
Originally Posted by Belisarius
Well, as for the first one, that's pretty trivial. Here's how I'd do it in PostgreSQL:
Code:
SELECT publisher FROM publisher_table ORDER BY publisher ASC;
Rename the column and table to taste.

Try slapping together the other two and post them if you think you need more help.
Nevermind. I already got all that set up (it doesn't have to be a real program, just the SQL pieces of code in a word document). Just check out my question in the Java forum.
Crow T. Robot is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing And Database grfxer Java 1 07-09-2004 12:25 PM
Can't see MySql database records in Mozilla monicao PHP 3 05-02-2004 05:19 PM
Online Books sde Lounge 1 12-17-2003 09:06 AM
Methods of moving a database... DarkTwilkitri PHP 8 11-19-2003 05:02 AM
a query type of questiton sde Program Design and Methods 6 08-21-2003 04:55 PM


All times are GMT -8. The time now is 02:04 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting