{"id":364,"date":"2012-05-25T13:12:07","date_gmt":"2012-05-25T18:12:07","guid":{"rendered":"http:\/\/mkncreations.com\/sandbox\/mknwp\/?p=364"},"modified":"2012-11-29T11:56:57","modified_gmt":"2012-11-29T16:56:57","slug":"select-all-in-a-single-select-parameter","status":"publish","type":"post","link":"https:\/\/mkncreations.com\/site\/2012\/05\/select-all-in-a-single-select-parameter\/","title":{"rendered":"Select All in a Single Select Parameter"},"content":{"rendered":"<p>If you have a single select parameter but you would like to have the &#8220;Select All&#8221; option added to it here is how you can accomplish it:<\/p>\n<p>We will assume that ID is of type uniqueidentifier.<\/p>\n<p><strong>Parameter Query:<\/strong><\/p>\n<div><code><br \/>\nSELECT<br \/>\nID<br \/>\n,\u00a0Name<br \/>\nFROM\u00a0table<\/p>\n<p>UNION<\/p>\n<p>SELECT<br \/>\n'00000000-0000-0000-0000-000000000000'\u00a0AS\u00a0ID<br \/>\n,\u00a0'Select\u00a0All'\u00a0as\u00a0Name <\/code><\/div>\n<p><strong>Main Dataset Query:<\/strong><\/p>\n<div><code><br \/>\nSELECT\u00a0*<br \/>\nFROM\u00a0yourTable<br \/>\nWHERE\u00a0ID\u00a0=\u00a0@yourParameter<br \/>\nOR\u00a0@yourParameter\u00a0=\u00a0'00000000-0000-0000-0000-000000000000'\u00a0 <\/code><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you have a single select parameter but you would like to have the &#8220;Select All&#8221; option added to it here is how you can&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12,11],"tags":[79,21,81,80,50,78,38,49],"class_list":["post-364","post","type-post","status-publish","format-standard","hentry","category-how_to","category-sql","category-ssrs","tag-microsoft","tag-ms","tag-parameter","tag-singleselect","tag-sql-2","tag-sql2008","tag-ssrs-2","tag-tsql"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/364"}],"collection":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/comments?post=364"}],"version-history":[{"count":2,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/364\/revisions"}],"predecessor-version":[{"id":450,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/364\/revisions\/450"}],"wp:attachment":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/media?parent=364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/categories?post=364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/tags?post=364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}