SID-01769: Results from db into another query
| Status: |
Answered |
TWiki version: |
5.1.3 |
Perl version: |
|
| Category: |
DatabasePlugin |
Server OS: |
|
Last update: |
12 years ago |
Is there a way to use the database plugin to pass the results from one query into the another query instance?
For example, i use the DB plugin to get the SQL command string (stored in the DB), then call that SQL string using another instance of the DB plugin.
Basically I'm not sure how to store that first result into some kind of variable that can then be retrieved for the second.
--
Justin Martin - 2013-07-24
Discussion and Answer
Same as before, e.g. delay the DATABASE_SQL embedded in the format of the outer DATABASE_SQL.
format="$percntDATABASE_SQL{\"MSDB2:Database\" sql=\"select control_type from table\" format=\"...\"}$percnt"
--
Peter Thoeny - 2013-07-25
Thanks. In this case i want the inner one evaluated first, but this was helpful.
--
Justin Martin - 2013-07-25
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.