Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: subquery in a loop

From: dockimbel:free at: 28-Jun-2006 22:59

Try this : sql: { select name, epid, active from v_ev_cus_prof where Active = 'true' and epid in ( select epid from v_ev_cus_snmp_contact where snmp_host = '10.1.0.20' ) } get-info: func [line][ read rejoin [ pgsql://xxxx:xxxx- trim/all line ":5555/mcdb?" sql ] ] utilip: read/lines %/opt/nms/scripts/ip.txt foreach line utilip [print get-info line] ;----------- end ----------- The only important modification here, is the addition of 'trim/all function to clean up your 'line content read from file (may contain blanks or other unwanted characters). If you still getting an error in open-proto function, add this line at the beginning of your script : trace/net on Then publish here the output so we can analyze this deeper. Btw, you really have so much Postgresql servers, each running on port 5555 (not the default pgsql port) ? Regards, -- DocKimbel John Blake wrote: