lqQry is Data Source
lcSQL is string
// Preparamos cursor
lcSQL = "Select * from tabla1 where 1 = 0"
HExecuteSQLQuery(lqQry, lcSQL)
// borramos ficheros anteriores
fDelete("C:\temp\tmp.fic")
fDelete("C:\temp\tmp.ndx")
// guardamos el resultado en un fichero
IF HToFile(lqQry, "C:\temp\tmp.fic") = True THEN
Trace("si")
END
// vinculamos temporalmente el cursor al analisis
HDeclareExternal("C:\temp\tmp.fic", "cCursor")
// A continuacion se puede hacer una relacion con el cursor lcSQL = "Select
* from tabla2 left join tabla2.campo1 = cCursor.Capo1"
HExecuteSQLQuery(lqQry, lcSQL)