sql joins and the revDataFromQuery function

2003-06-11 Thread rand valentine
 I am working on a database using Valentina and RunRev. I am just learning
sql and have discovered that sql joins will be key to a lot of my
development. So I constructed a join, which looks like the following:

SELECT BasicLexicon.Nishnaabemwin, BasicLexicon.PoS, Keys.Key, Keys.PoS,
Keys.SubKey, Keys.UniqueCode FROM BasicLexicon, Keys WHERE
BasicLexicon.UniqueCode = Keys.UniqueCode

 The details aren't important -- Basically, all this is doing is getting
information from _two_ different tables in a Valentina database, and
stitching them together. Here's my question -- Why does this work with the
following function call:

  put revDataFromQuery(,,1,myJoin,) into fld dataset

This does exactly what I want! What puzzles me is the fact that the
revDataFromQuery seems to require a single database ID:

revDataFromQuery([columnDelim],[rowDelim],databaseID,SQLQuery[,varsList])

So how can this join succeed, since it's looking up two distinct queries as
defined by the Database Query Builder, and I only passed it the index of one
(1)? Is this a bug soon to be corrected, or am I missing something? Thanks.

rand valentine 

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: sql joins and the revDataFromQuery function

2003-06-11 Thread Jan Schenkel
--- rand valentine [EMAIL PROTECTED] wrote:
  I am working on a database using Valentina and
 RunRev. I am just learning
 sql and have discovered that sql joins will be key
 to a lot of my
 development. So I constructed a join, which looks
 like the following:
 
 SELECT BasicLexicon.Nishnaabemwin, BasicLexicon.PoS,
 Keys.Key, Keys.PoS,
 Keys.SubKey, Keys.UniqueCode FROM BasicLexicon, Keys
 WHERE
 BasicLexicon.UniqueCode = Keys.UniqueCode
 
  The details aren't important -- Basically, all this
 is doing is getting
 information from _two_ different tables in a
 Valentina database, and
 stitching them together. Here's my question -- Why
 does this work with the
 following function call:
 
   put revDataFromQuery(,,1,myJoin,) into fld
 dataset
 
 This does exactly what I want! What puzzles me is
 the fact that the
 revDataFromQuery seems to require a single database
 ID:
 

revDataFromQuery([columnDelim],[rowDelim],databaseID,SQLQuery[,varsList])
 
 So how can this join succeed, since it's looking up
 two distinct queries as
 defined by the Database Query Builder, and I only
 passed it the index of one
 (1)? Is this a bug soon to be corrected, or am I
 missing something? Thanks.
 
 rand valentine 
 

Hi Rand,

The reason why Valentina can figure it out, is that
one database can contain multiple tables. In fact, if
the tables were in separate databases, Valentina
couldn't possibly link these two tables. (*)

Hope this helped,

Jan Schenkel.

(*) except of course if you were to import one of the
tables into the other database as a temporary table,
but I digress.

=
As we grow older, we grow both wiser and more foolish at the same time.  (La 
Rochefoucauld)

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution