{"id":448,"date":"2012-11-29T11:55:38","date_gmt":"2012-11-29T16:55:38","guid":{"rendered":"https:\/\/mkncreations.com\/site\/?p=448"},"modified":"2014-11-04T11:32:22","modified_gmt":"2014-11-04T16:32:22","slug":"none-value-in-multiselect-parameter","status":"publish","type":"post","link":"https:\/\/mkncreations.com\/site\/2012\/11\/none-value-in-multiselect-parameter\/","title":{"rendered":"None Value in Multiselect Parameter"},"content":{"rendered":"<p>If you have a multiselect parameter but you would like to have the &#8220;None&#8221; option added to it here is how you can accomplish it. The None option assumes that you would like to display entities (records) that might not have values:<\/p>\n<p>We will assume that ID is of type uniqueidentifier.<\/p>\n<p><strong>Parameter Query:<\/strong><\/p>\n<blockquote><p>\nSELECT<br \/>\nID<br \/>\n, Name<br \/>\nFROM table<\/p>\n<p>UNION<\/p>\n<p>SELECT<br \/>\n&#8216;00000000-0000-0000-0000-000000000000&#8217; AS ID<br \/>\n, &#8216;_None&#8217; as Name <\/p><\/blockquote>\n<p><strong>Main Dataset Query:<\/strong><\/p>\n<blockquote><p>\nSELECT *<br \/>\nFROM yourTable<br \/>\nWHERE ISNULL(ID, &#8216;00000000-0000-0000-0000-000000000000&#8217;) IN (@yourParameter)\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>If you have a multiselect parameter but you would like to have the &#8220;None&#8221; option added to it here is how you can accomplish it.&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,82,81,50,78,38,49],"class_list":["post-448","post","type-post","status-publish","format-standard","hentry","category-how_to","category-sql","category-ssrs","tag-microsoft","tag-ms","tag-multiselect","tag-parameter","tag-sql-2","tag-sql2008","tag-ssrs-2","tag-tsql"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/448"}],"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=448"}],"version-history":[{"count":5,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/448\/revisions"}],"predecessor-version":[{"id":37625,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/448\/revisions\/37625"}],"wp:attachment":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/media?parent=448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/categories?post=448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/tags?post=448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}