including parameters in OPENQUERY

From the OPENQUERY documentation it states that: OPENQUERY does not accept variables for its arguments. See this article for a workaround. UPDATE: As suggested, I’m including the recommendations from the article below. Pass Basic Values When the basic Transact-SQL statement is known, but you have to pass in one or more specific values, use code … Read more

How to get multiple parameters with same name from a URL in PHP

Something like: $query = explode(‘&’, $_SERVER[‘QUERY_STRING’]); $params = array(); foreach( $query as $param ) { // prevent notice on explode() if $param has no ‘=’ if (strpos($param, ‘=’) === false) $param += ‘=’; list($name, $value) = explode(‘=’, $param, 2); $params[urldecode($name)][] = urldecode($value); } gives you: array( ‘ctx_ver’ => array(‘Z39.88-2004’), ‘rft_id’ => array(‘info:oclcnum/1903126’, ‘http://www.biodiversitylibrary.org/bibliography/4323’), ‘rft_val_fmt’ => … Read more

How can I read command line parameters from an R script?

Dirk’s answer here is everything you need. Here’s a minimal reproducible example. I made two files: exmpl.bat and exmpl.R. exmpl.bat: set R_Script=”C:\Program Files\R-3.0.2\bin\RScript.exe” %R_Script% exmpl.R 2010-01-28 example 100 > exmpl.batch 2>&1 Alternatively, using Rterm.exe: set R_TERM=”C:\Program Files\R-3.0.2\bin\i386\Rterm.exe” %R_TERM% –no-restore –no-save –args 2010-01-28 example 100 < exmpl.R > exmpl.batch 2>&1 exmpl.R: options(echo=TRUE) # if you want … Read more

For PowerShell cmdlets, can I always pass a script block to a string parameter?

# Delay-bind script-block argument: # The code inside { … } is executed for each input object ($_) and # the output is passed to the -NewName parameter. … | Rename-Item -NewName { $_.Name -replace ‘\.txt$’,’.log’ } The call above shows an application of a delay-bind script-block ({ … }) argument, which is an implicit … Read more