Hi John...

Off the top of my head, you could try this.......

<CFQUERY DATASOURCE="#blah#" NAME="name">
         SELECT DISTINCT PhotographerName
         FROM            Photographer, Photo
         WHERE   Photo.CategoryId = 1
         AND             Photographer.PhotographerId = Photo.PhotographerId
</CFQUERY>

I'm sure many others will correct me if I'm wrong!  :^)

Nick




At 23:13 4/04/00 -0400, you wrote:
>Hi all
>
>I have a database with two tables. The first one is a 'many' table, each
>record represents one photograph. Among other keys is a foreign key for the
>photographer. So, among the 250,000 records, a given photographer's ID will
>show up hundreds of times. Also present is a foreign key that names the
>category (marine, aviation, train, etc).
>
>The second is a 'one' table. Each row here represents a person, with a
>foreign key (to yet a 3rd table) that says he or she is a photgrapher.
>
>How would I query my datasource and get a list photgraphers for just one
>category like aviation?
>
>Thanks!
>
>* john *
>
>
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to