realbasic-betas.mbox
[Top] [All Lists]

Re: SQL -- Joining three tables -- In RB

To: REALbasic Betas <realbasic-betas at lists dot realsoftware dot com>
Subject: Re: SQL -- Joining three tables -- In RB
From: Norman Palardy <palardyn at shaw dot ca>
Date: Sun, 30 Nov 2003 00:26:57 -0700
References: <381B8BB1-2171-11D8-8092-000A95C54090 at i-55 dot com> <17D791C2-21BC-11D8-A04B-000A95A9544A at shaw dot ca> <9CAC359E-2290-11D8-BD08-000A95C54090 at i-55 dot com> <0D33D616-229F-11D8-A04B-000A95A9544A at shaw dot ca> <18153A05-22F8-11D8-AC6A-000A95C54090 at i-55 dot com> <72AC127E-2304-11D8-A04B-000A95A9544A at shaw dot ca>

On 30-Nov-03, at 12:11 AM, Norman Palardy wrote:


On 29-Nov-03, at 10:43 PM, Dr. Leif Lensgraf wrote:

Analyzing your data to see if in fact there is a row in msgTBL that should have a match in both the ToTBL & FromTBL would be my next step.

Well, the I know that the data is in the tables as I can open the database up and look it.

Maybe someone out there can throw together a quick table database and verify that this is a bug?

I did and it's not a bug. It works.

If there is matching data it WILL get picked up by that query so a review of your data seems in order

There IS a bug in the way RB is handling the query.
But not the one causing your problem.

Given :

        TableA  (col1 integer , text)

        1       msg 1
        2       msg 2

        TableB ( col2 integer, text)

        3       msg 3
        4       msg 4

        TableC ( col1 integer , col2 integer , col3 integer)
        1       3       5
        1       4       6

If I query

        select TableA.col1, TableB.col2, TableC.col3
        from TableA, TableB, TableC
        where TableA.col1 = TableC.col1
        and TableB.col2 = TableC.col2
        and TableC.col3 = 5

I get 2 result rows when I should get 1.

I have to write up a short example (based on what I wrote here), but I just ran into this in the a9 beta


- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>