OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorks2008R2;Data Source=IB-SEZ-PC-089\sql2008r2;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=IB-SEZ-PC-089;Use Encryption for Data=False;Tag with column collation when possible=False];
LOAD AddressID, AddressLine1, AddressLine2, City, PostalCode;
SQL SELECT AddressID, AddressLine1, AddressLine2, City, PostalCode FROM AdventureWorks2008R2.Person.Address;
LOAD AddressTypeID, Name;
SQL SELECT AddressTypeID, Name FROM AdventureWorks2008R2.Person.AddressType;
Ok... the way to join tables, more than two, in pure QV script, is one at a time. The best way you do that is making a SQL sentence and join all table that you need and bring the specifically data you need to process. Think that the SQL engine y more efficient than QV in this kind of task. The beauty of QV is manage data in-memory.