[thelist] SQL View: Join? SubQuery?

Susan Wallace susanhw at webcastle.com
Tue Aug 20 10:45:00 CDT 2002


Greetings!

I am trying to put together a View in MS-SQL. At this point, I am just
looking for a push in the right direction so that I can use trial and error
to learn this syntax, because it will come up again. :)

Here are the Tables I have:

Compositions
	CompID
	ComposerName
	CompositionTitle

Programs
	Venue
	Date
	Conductor
	PerformedPieces

The field Performed Pieces in Programs is a list (1, 287, 543, 2)
where each list item would match the CompID from Composers, etc

The end result needs to be a completed Program Record, where all fields are
shown, including the Title and Composer Name from Compositions. For example:

Venue: Jones Hall, Houston Texas
Date: August 20, 2002
Conductor: Elmer Fudd
Performed Pieces:
Composition in A Minor (for Marimba) - Bugs Bunny
Corino Falso - Eliades Ochoa
Camp Hill Comrade - Harland Mitchell

Should I be looking at using a Subquery in the View for this, or a Join? or
something else? Or is this just a bad idea? ;)

Thanks for your help!
Susan Wallace

<tip type="mailing lists">
If you are working with an ISP that is going to setup a mailing list for
the purpose of sending out say, store announcements, make sure that they
set the list properties so that replies to messages sent on the list go to
the list owner instead of the entire list. This will keep down the "I don't
care what you have on sale" messages that come back (and forth) if someone
does not want to be on the list.
</tip>






More information about the thelist mailing list