[dba-SQLServer] Newbie needs help with select statement

Robert L. Stewart robert at webedb.com
Mon Feb 2 13:08:05 CST 2009


Francisco,

Actually, that is an INNER JOIN that he is attempting. The problem
is that he is not using the correct columns. That is why he is not
getting data back. And, if you try this type of join using the
where clause instead, you will find that it is actually faster than
using the correct join syntax.  :-)

Jean-Paul, you are going to have to tell us the names of the columns
in your tables before we can help you.


Robert

At 03:58 PM 1/31/2009, you wrote:
>Date: Sat, 31 Jan 2009 13:58:50 -0800
>From: Francisco Tapia <fhtapia at gmail.com>
>Subject: Re: [dba-SQLServer] Newbie needs help with select statement
>To: Discussion concerning MS SQL Server
>         <dba-sqlserver at databaseadvisors.com>
>Message-ID:
>         <b874372a0901311358x317b2701sb1b19bffc0f52f7f at mail.gmail.com>
>Content-Type: text/plain; charset=windows-1252
>
>Because of Sql Server standards, try to stick to Joins made with the INNER /
>LEFT / FULL / OUTER keywords (see books Online).  Joins made at the where
>clause do work but may have sporadic results that are not consistent.
>
>
>-Francisco
>http://sqlthis.blogspot.com | Tsql and More...
>
>
>On Sat, Jan 31, 2009 at 1:56 PM, jean-paul <jnatola at hotmail.com> wrote:
>
> >
> > So I read about 50 webpages and decided to try this statement
> >
> > SELECT *FROM contacts, contacts_organization_typesWHERE contacts.id =
> > contacts_organization_types.id





More information about the dba-SQLServer mailing list