{"id":329,"date":"2014-10-08T19:00:46","date_gmt":"2014-10-09T01:00:46","guid":{"rendered":"http:\/\/www.phantomimages.com\/blogs\/tech\/?p=329"},"modified":"2014-10-23T17:18:07","modified_gmt":"2014-10-23T23:18:07","slug":"cm-2012-reporting-creating-meaningful-results-with-sql-case-statements","status":"publish","type":"post","link":"https:\/\/www.phantomimages.com\/blogs\/tech\/2014\/10\/08\/cm-2012-reporting-creating-meaningful-results-with-sql-case-statements\/","title":{"rendered":"CM 2012 &#8211; Reporting &#8211; Creating Meaningful Results with SQL CASE Statements"},"content":{"rendered":"<p>Building upon our previous reporting outlined in<\/p>\n<p><a href=\"http:\/\/www.phantomimages.com\/blogs\/tech\/2014\/10\/07\/cm-2012-reporting-create-a-table-report-using-ssrs\/\" target=\"_blank\">CM 2012 \u2013 REPORTING \u2013 CREATE A TABLE REPORT USING SSRS<\/a><\/p>\n<p>we will use a SQL CASE statement to create more meaningful results from the values presented previously.<\/p>\n<p><iframe loading=\"lazy\" title=\"Configuration Manager 2012 - Creating Meaningful Results with CASE Statements Using Report Builder\" width=\"474\" height=\"356\" src=\"https:\/\/www.youtube.com\/embed\/Dyt3ggsnMtk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>The SQL query used in this video is shown below:<\/p>\n<p>SELECT<br \/>\nv_R_System.Name0,<br \/>\nV_R_System.Operating_System_Name_and0,<br \/>\nCASE<br \/>\nWHEN<br \/>\nv_R_System.Client0=1 THEN &#8216;YES&#8217;<br \/>\nELSE<br \/>\n&#8216;NO&#8217;<br \/>\nEND AS Client0,<br \/>\nCASE<br \/>\nWHEN<br \/>\nv_R_System.Active0=1 THEN &#8216;YES&#8217;<br \/>\nELSE<br \/>\n&#8216;NO&#8217;<br \/>\nEND AS Active0<\/p>\n<p>FROM<br \/>\nv_R_System<\/p>\n<p>ORDER BY<br \/>\nV_R_System.Operating_System_Name_and0,<br \/>\nv_R_System.Name0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Building upon our previous reporting outlined in CM 2012 \u2013 REPORTING \u2013 CREATE A TABLE REPORT USING SSRS we will use a SQL CASE statement to create more meaningful results from the values presented previously. The SQL query used in this video is shown below: SELECT v_R_System.Name0, V_R_System.Operating_System_Name_and0, CASE WHEN v_R_System.Client0=1 THEN &#8216;YES&#8217; ELSE &#8216;NO&#8217; &hellip; <a href=\"https:\/\/www.phantomimages.com\/blogs\/tech\/2014\/10\/08\/cm-2012-reporting-creating-meaningful-results-with-sql-case-statements\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">CM 2012 &#8211; Reporting &#8211; Creating Meaningful Results with SQL CASE Statements<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":338,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"video","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[20,63],"tags":[36,71,41,73,72],"class_list":["post-329","post","type-post","status-publish","format-video","has-post-thumbnail","hentry","category-cm2012","category-reporting","tag-cm-2012","tag-cm-2012-reporting","tag-configuration-manager-2012","tag-sql-report-builder","tag-ssrs","post_format-post-format-video"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-content\/uploads\/2014\/10\/System-Center-2012-Logo-CM-Reporting-CASE-Statements.png","jetpack_shortlink":"https:\/\/wp.me\/p3iUa6-5j","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/posts\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":10,"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/posts\/329\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/posts\/329\/revisions\/367"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/media\/338"}],"wp:attachment":[{"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/categories?post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phantomimages.com\/blogs\/tech\/wp-json\/wp\/v2\/tags?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}