Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL query peeps help me!!!!

Re: SQL query peeps help me!!!!

From: TurkBear <jgreco1_at_mn.rr.com>
Date: Thu, 08 Aug 2002 10:20:02 -0500
Message-ID: <ft25lucp8338a3c55eib5s9bammkhd9b8s@4ax.com>

With regard to 2:
We use naming conventions that indicate what type the object is, so the use of tblXxxxxx for tables is not unreasonable, assuming the viewXxxxxx is for views, seqXxxxx for sequences, etc..

"Jim Kennedy" <kennedy-family_at_attbi.com> wrote:

>Ugly.
>1. What is the first address? Do you mean any of the many addresses that a
>contact has? Since there is no first address in an unordered set.
>2. I would, in the future, lose the tbl naming convention, you know its a
>table.
>Jim
>"mayhem" <neil_at_sw4it.com> wrote in message
>news:8e8664e8.0208080334.1851bae1_at_posting.google.com...
>> I've got this query
>>
>> SELECT tblContacts.ContactID, tblContacts.FileAs, tblContacts.Title,
>> tblContacts.FirstName, tblContacts.LastName, tblContacts.MainContact,
>> tblContAddress.Address1, tblContAddress.Address2,
>> tblContAddress.Address3, tblContAddress.Address4,
>> tblContAddress.Address5, tblContAddress.Town, tblContAddress.County,
>> tblContAddress.Postcode, tblContAddress.Country,
>> tblInstitutes.InstituteName, tblContLinkAddress.MainAddress
>>
>> FROM (((( tblContacts INNER JOIN tblContLinkAddress ON
>> tblContacts.ContactID = tblContLinkAddress.ContactID) INNER JOIN
>> tblContAddress ON tblContLinkAddress.AddressID =
>> tblContAddress.AddressID) LEFT JOIN tblInstitutes ON
>> tblContacts.InstituteID = tblInstitutes.InstituteID) LEFT JOIN
>> tblInstituteTypes ON tblInstitutes.InstituteTypeID =
>> tblInstituteTypes.InstituteTypeID)
>>
>> I want the contact info returned but only the first address found for
>> each contact, obviously distinct won't work as all rows returned will
>> be unique anyway. I assume I have to use GROUP BY in some way. Any
>> ideas????
>>
>> Thanks,
>

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------

   http://www.newsfeed.com The #1 Newsgroup Service in the World! -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =----- Received on Thu Aug 08 2002 - 10:20:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US