I have a situation where I query a global table to get a subset of the original values (Subset A). Then, depending on the value of the first entry on that query, I need to query Subset A in various ways creating Subset B.
In order to accomplish this currently I need to dump Subset A into a "dummy" node so the values are stored somewhere, and then I am able to query Subset A normally. It would be nice if I could do something like the following:
Table myGlobalTable = reftable("GlobalTable1"); //Option 1 Table SubsetA = query("SELECT * FROM $1 WHERE Column1 > 2",myGlobalTable); //Option 2 Table SubsetA = nullvar; query("SELECT * FROM $1 WHERE Column1 > 2",myGlobalTable); dumpquery(SubsetA); Table SubsetB = nullvar if(SubsetA[1][2] <= 10) { SubsetB = query("SELECT * FROM $1 WHERE Column3 = 2", SubsetA); } else { SubsetB = query("SELECT * FROM $1 WHERE Column3 = 1", SubsetA); }
This would make it so I don't need to create a "dummy" node that I will be dumping data into, but I would be able to create and store multiple queries within the same code block.