{"id":8613,"date":"2020-11-04T09:33:50","date_gmt":"2020-11-04T17:33:50","guid":{"rendered":"https:\/\/minisoft.com\/support\/?p=8613"},"modified":"2020-11-04T16:44:46","modified_gmt":"2020-11-05T00:44:46","slug":"sql-resultset-preprocessor","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/sql-resultset-preprocessor\/","title":{"rendered":"SQL ResultSet Preprocessor"},"content":{"rendered":"\n<p>For a use of the SQL ResultSet Preprocessor, consult the following post: <strong><a href=\"\/support\/index.php\/create-placeholder-names-for-sql-columns\/\">Create placeholder names for SQL columns<\/a><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"437\" height=\"315\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2020\/11\/ResultSet1.png\" alt=\"\" class=\"wp-image-8614\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/11\/ResultSet1.png 437w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/11\/ResultSet1-300x216.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/11\/ResultSet1-150x108.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/11\/ResultSet1-250x180.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/11\/ResultSet1-416x300.png 416w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/11\/ResultSet1-210x150.png 210w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/figure>\n\n\n\n<p>The markers are string patterns to match in the data file.\u00a0When a line in the data file starts with the \u201cSQL Statement Marker\u201d, the line is used for the SQL Statement. When a line in the data file starts with the \u201cSubstitution Marker\u201d, the line is a positional substitution value.\u00a0The \u201cSubstitution Match\u201d specifies the characters in the SQL Statement to substitute with a positional substitution value. \u00a0When a line starts with the \u201cParameter Marker\u201d, the line is a positional parameter value. Parameters are specified in the SQL statement with a \u201c?\u201d. When a line doesn\u2019t start with any marker, the line is a positional parameter value. Using the following data file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#sqlselect orderno, fname, lname, item, qty, price, wrap, size, color from # as t1, # as t2 where t1.orderno = ? and t1.orderno = t2.ordernumber<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">#parm199723820101<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">#suborderheader<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">#suborderlines<\/pre>\n\n\n\n<p>The select statement becomes:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select&nbsp;orderno,&nbsp;fname,&nbsp;lname, item,&nbsp;qty, price, wrap, size, color from&nbsp;order header&nbsp;as t1,&nbsp;orderliness&nbsp;as t2 where t1.orderno&nbsp;= ? and t1.orderno&nbsp;= t2.ordernumber<\/pre>\n\n\n\n<p>The value \u201c199723820101\u201d is used as the first parameter (where the ? is ).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a use of the SQL ResultSet Preprocessor, consult the following post: Create placeholder names for SQL columns The markers are string patterns to match in the data file.\u00a0When a line in the data file starts with the \u201cSQL Statement Marker\u201d, the line is used for the SQL Statement. When a line in the data [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[338,527],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8613"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=8613"}],"version-history":[{"count":3,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8613\/revisions"}],"predecessor-version":[{"id":8621,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8613\/revisions\/8621"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=8613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=8613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=8613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}