Tags:
create new tag
view all tags

SID-01769: Results from db into another query

Status: Answered 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

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title Results from db into another query
SupportCategory DatabasePlugin
TWiki version 5.1.3
Server OS

Web server

Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2013-07-25 - JustinMartin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.