sql joins and the revDataFromQuery function

rand valentine jrvalent at wisc.edu
Wed Jun 11 17:33:00 EDT 2003


 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 




More information about the use-livecode mailing list