{"id":6306,"date":"2018-02-28T17:20:44","date_gmt":"2018-02-28T17:20:44","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=6306"},"modified":"2020-07-02T10:23:03","modified_gmt":"2020-07-02T17:23:03","slug":"create-placeholder-names-for-sql-columns","status":"publish","type":"post","link":"https:\/\/minisoft.com\/support\/create-placeholder-names-for-sql-columns\/","title":{"rendered":"Create placeholder names for SQL columns"},"content":{"rendered":"<p>When returning a large number of columns from an SQL call, you can create placeholder names for all the columns in just a few quick steps. Every column gets a name and the name is spelled correctly.<\/p>\n<p>1) <a href=\"\/support\/index.php\/getting-started-guide-eformz\/\">Create a new project<\/a>.<br \/>\n2) <a href=\"\/support\/index.php\/where-to-set-up-your-database-connection\/\">Define the Database connection<\/a> (either in the project or in Databases.xml).<br \/>\n3) Create an SQL Result Set pre-processor by right clicking the project and selecting Add Preprocessor &gt; SQL ResultSet. Make sure the SQL Select statement returns all of the columns and set the row limit to 1.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6307\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL1.png\" alt=\"\" width=\"167\" height=\"148\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL1.png 167w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL1-150x133.png 150w\" sizes=\"(max-width: 167px) 100vw, 167px\" \/><\/a><\/p>\n<p>4) Right click the project and select Display Forms and Data. Remember to have an actual input file of one line and not test data.<br \/>\n5) Add Variables that appear (right click Row &gt; Add Variables).<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL2-alt.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6734\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL2-alt.png\" alt=\"\" width=\"380\" height=\"250\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL2-alt.png 380w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL2-alt-300x197.png 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL2-alt-150x99.png 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL2-alt-250x164.png 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL2-alt-274x180.png 274w\" sizes=\"(max-width: 380px) 100vw, 380px\" \/><\/a><\/p>\n<p>6) Disable the pre-processor.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6309\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL3.png\" alt=\"\" width=\"226\" height=\"203\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL3.png 226w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL3-150x135.png 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL3-200x180.png 200w\" sizes=\"(max-width: 226px) 100vw, 226px\" \/><\/a><\/p>\n<p>7) You can either use the variables in the project you just created or you can save the SQL Result set page as an XML file to create the labels in another project.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6310\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL4.png\" alt=\"\" width=\"261\" height=\"86\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL4.png 261w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL4-150x49.png 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/SQL4-250x82.png 250w\" sizes=\"(max-width: 261px) 100vw, 261px\" \/><\/a><\/p>\n<p>The XML file created can be used to similarly create a group of variables in another project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When returning a large number of columns from an SQL call, you can create placeholder names for all the columns in just a few quick steps. Every column gets a name and the name is spelled correctly. 1) Create a new project. 2) Define the Database connection (either in the project or in Databases.xml). 3) [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91,3],"tags":[84,128],"_links":{"self":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6306"}],"collection":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=6306"}],"version-history":[{"count":4,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6306\/revisions"}],"predecessor-version":[{"id":8196,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6306\/revisions\/8196"}],"wp:attachment":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=6306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=6306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=6306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}