From: TurkBear <jgreco1@mn.rr.com>
Newsgroups: comp.databases.oracle.server,microsoft.public.sqlserver.server,comp.databases.ms-sqlserver
Subject: Re: SQL query peeps help me!!!!
Date: Thu, 08 Aug 2002 10:20:02 -0500
Reply-To: jgreco1@mn.rr.com
Message-ID: <ft25lucp8338a3c55eib5s9bammkhd9b8s@4ax.com>
References: <8e8664e8.0208080334.1851bae1@posting.google.com> <KWu49.33667$7n5.6853@sccrnsc01>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 47
X-Authenticated-User: 86802158
X-Comments: This message was posted through Newsfeeds.com
X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support,  spam or any illegal or copyrighted postings.
X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!!
X-Report: Please report illegal or inappropriate use to <abuse@newsfeeds.com> You may also use our online abuse reporting from: http://www.newsfeeds.com/abuseform.htm
X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS)
Organization: Newsfeeds.com http://www.newsfeeds.com 73,000+ UNCENSORED Newsgroups.
Path: news.easynews.com!easynews!newshosting.com!news-xfer2.atl.newshosting.com!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!goliath2.newsgroups.com!not-for-mail
Xref: easynews comp.databases.oracle.server:157276 microsoft.public.sqlserver.server:192709 comp.databases.ms-sqlserver:76367
X-Received-Date: Thu, 08 Aug 2002 08:17:25 MST (news.easynews.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@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@sw4it.com> wrote in message
>news:8e8664e8.0208080334.1851bae1@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 =-----
