Article View: borland.public.vdbase.data.sql
Article #1410Re: SQL and query designer (5.5)
From: Steve Koterski
Date: Mon, 26 Jan 1998 00:00
Date: Mon, 26 Jan 1998 00:00
41 lines
2549 bytes
2549 bytes
On Sun, 25 Jan 1998 21:22:37 GMT, Tim Smith wrote: >vdb insisted on regarding "DISTINCT" as a field, so I removed it, >reversed the table order and bingo! it worked. However I do not >understand how vdb created the join when there are no values in the >child table key field. Any chance of an explanation? I was speaking from the perspective of local SQL, the BDE implementation of the SQL-92 specification. Unless Visual dBASE 5.5 is doing its own parsing of the SQL statement and not the local SQL parser, the DISTINCT keywprd should be supported. Perhaps some dBASE experts out there can comment on that side of this situation. The dBASE command SET RELATION produces a result set like that for a LEFT OUTER join. That is, rows in the source table are *not* filtered out when there is not a matching row in the joining table. The columns from the joining table for these non-matching rows simply contain empty (NULL) values. An inner join has just the opposite effect. Any given row in the source table for which there is not a corresponding row in the joining table will be filtered out from the result set. A join is an inner join if: 1. The join operator is JOIN. 2. No use of the OUTER keyword with the JOIN keyword. 3. Use of the INNER keyword with JOIN. 4. The join is accomplished in the WHERE clause (fld = fld). If your source table has rows and the joining table has *no* rows, the result set should be empty for an inner join. If you are getting results other than this, it would seem to indicate that Visual dBASE 5.5 is using its own implementation of SQL, not that of the BDE (local SQL). ************************************************************************** Steve Koterski Borland International, Inc. http://www.borland.com/delphi (Remove the "SPICEDHAM2" from the address. Death to spam-bots!)
Technical Details
Message-ID:
<34d3092e.21299989@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34c3dafe.9355111@forums.borland.com> <34c3e924.27859321@forums.borland.com> <34cbac57.14331576@news.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,bf04adadd27a4fa9 X-Google-Attributes: gidff5a1,public From: koterski@SPICEDHAM2borland.com (Steve Koterski) Subject: Re: SQL and query designer (5.5) Date: 1998/01/26 Message-ID: <34d3092e.21299989@forums.borland.com> X-Deja-AN: 319477619 Content-Transfer-Encoding: 7bit References: <34c3dafe.9355111@forums.borland.com> <34c3e924.27859321@forums.borland.com> <34cbac57.14331576@news.demon.co.uk> Mime-Version: 1.0 Reply-To: koterski@SPICEDHAM2borland.com Content-Type: text/plain; charset=us-ascii Organization: Borland International, Technical Publications Newsgroups: borland.public.vdbase.data.sql