{"id":4472,"date":"2013-08-19T06:56:53","date_gmt":"2013-08-19T06:56:53","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/?p=4472"},"modified":"2013-08-19T06:56:53","modified_gmt":"2013-08-19T06:56:53","slug":"run-sql-queries-through-sage-crm-components","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/","title":{"rendered":"Run SQL Queries through Sage CRM Components"},"content":{"rendered":"<p>In our earlier post, we explained how to \u201c<a title=\"Re-install the Sage CRM component\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/03\/11\/re-installing-the-component\/\" target=\"_blank\">Re-install the Sage CRM component<\/a>\u201d files from within Sage CRM. In this blog, we would discuss how &#8220;to execute SQL queries using Sage CRM components&#8221;.<br \/>\nSage CRM components allow users to add\/modify the Sage CRM screens, lists, menus, tabs etc.in a single attempt. Suppose you need to execute SQL insert\/update queries using components files, then you need to add that SQL queries into the component files.<br \/>\nConsider an example where you want to execute below SQL update query in Sage CRM.<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #333399;\"><em>Update company set comp_status=\u2019active\u2019<\/em><\/span><\/p>\n<p>Same can be written in the component files as follows.<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #333399;\"><em>RUNSQL(\u201cUpdate company set comp_status=\u2019active\u2019 \u201d);<\/em><\/span><\/p>\n<p style=\"padding-left: 30px;\"><strong>1.<\/strong> Once done, add component file into INF folder of installation directory so that component will be available to run from Sage CRM in the component manager.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png\" target=\"_blank\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter  wp-image-4473\" alt=\"Path\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png\" width=\"625\" height=\"308\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\">By default INF folder path is C:\\Program Files\\Sage\\CRM\\&lt;&lt;CRM Instance&gt;&gt;\\inf\\<\/p>\n<p style=\"padding-left: 30px;\"><strong>2.<\/strong> Click on Install component button and screen will navigate to the confirmation screen.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/2.-Install-Component.png\" target=\"_blank\"><img decoding=\"async\" class=\"aligncenter  wp-image-4474\" alt=\"Install Component\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/2.-Install-Component.png\" width=\"651\" height=\"240\" \/><\/a><\/p>\n<p style=\"text-align: left;\"><em><span style=\"color: #993300;\"><strong>Also Read:<\/strong><\/span>\u00a0<a title=\"Mapping Component Issues\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/02\/16\/mapping-component-issues\/\" target=\"_blank\">Mapping Component Issues<\/a><\/em><\/p>\n<p style=\"padding-left: 30px;\"><strong>3.<\/strong> Again click on Install Component button and component will execute the SQL queries written in it.<br \/>\n<strong>4.<\/strong> Once, components are installed properly you will get component installed message.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/3.-Installed-component.png\" target=\"_blank\"><img decoding=\"async\" class=\"aligncenter  wp-image-4475\" alt=\"Installed component\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/3.-Installed-component.png\" width=\"520\" height=\"355\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\"><strong>5.<\/strong> Click on Continue button and then navigate to Administration &gt;&gt; System &gt;&gt; Metadata.<br \/>\n<strong>6.<\/strong> Select Refresh All option (other options will be selected automatically) and click on the Execute Refresh button.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/4.-Execute-Referesh.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4476\" alt=\"Execute Referesh\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/4.-Execute-Referesh.png\" width=\"679\" height=\"358\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\"><strong>7.<\/strong> Once done, you will get Refresh successfully executed message.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/5.-Refersh-Successful.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4477\" alt=\"Refersh Successful\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/5.-Refersh-Successful.png\" width=\"680\" height=\"259\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\"><strong>8.<\/strong> Log off Sage CRM and Run IISRESET command.<br \/>\n<strong>9.<\/strong> Now Login to Sage CRM again.<br \/>\n<strong>10.<\/strong> Check the status of all the companies. It will be changed to active status as we have executed SQL query through the component file.<\/p>\n<p>This way any table\/fields or SQL queries can be updated using component files without accessing Microsoft SQL queries.<br \/>\n<strong>Related Posts:<\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong>1.<\/strong>\u00a0<a title=\"Sage CRM 7.2 Facebook Component\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/05\/14\/sage-crm-7-2-facebook-component\/\" target=\"_blank\">Sage CRM 7.2 Facebook Component<\/a><br \/>\n<strong>2.<\/strong>\u00a0<a title=\"Mapping Component Issues\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/02\/16\/mapping-component-issues\/\" target=\"_blank\">Mapping Component Issues<\/a><br \/>\n<strong>3.<\/strong>\u00a0<a title=\"Control tab display using multiple SQL clauses\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/07\/03\/control-tab-display-using-multiple-sql-clauses\/\" target=\"_blank\">Control tab display using multiple SQL clauses<\/a><br \/>\n<strong>4.<\/strong>\u00a0<a title=\"Add Divider or Subsection for existing screen in Sage CRM\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/07\/24\/add-divider-or-subsection-for-existing-screen-in-sage-crm\/\" target=\"_blank\">Add Divider or Subsection for existing screen in Sage CRM<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our earlier post, we explained how to \u201cRe-install the Sage CRM component\u201d files from within Sage CRM. In this blog, we would discuss how &#8220;to execute SQL queries using Sage CRM components&#8221;. Sage CRM components allow users to add\/modify the Sage CRM screens, lists, menus, tabs etc.in a single attempt. Suppose you need to\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[332],"tags":[739,2010,2333],"class_list":["post-4472","post","type-post","status-publish","format-standard","hentry","category-sage-crm","tag-components","tag-sage-crm","tag-sql-queries"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Run SQL Queries through Sage CRM Components - Sage CRM \u2013 Tips, Tricks and Components<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Run SQL Queries through Sage CRM Components - Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"In our earlier post, we explained how to \u201cRe-install the Sage CRM component\u201d files from within Sage CRM. In this blog, we would discuss how &#8220;to execute SQL queries using Sage CRM components&#8221;. Sage CRM components allow users to add\/modify the Sage CRM screens, lists, menus, tabs etc.in a single attempt. Suppose you need to\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-19T06:56:53+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png\" \/>\n<meta name=\"author\" content=\"greysagecrm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"greysagecrm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/\",\"name\":\"Run SQL Queries through Sage CRM Components - Sage CRM \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png\",\"datePublished\":\"2013-08-19T06:56:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#primaryimage\",\"url\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png\",\"contentUrl\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run SQL Queries through Sage CRM Components\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\",\"name\":\"Sage CRM \u2013 Tips, Tricks and Components\",\"description\":\"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\",\"name\":\"greysagecrm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"caption\":\"greysagecrm\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Run SQL Queries through Sage CRM Components - Sage CRM \u2013 Tips, Tricks and Components","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/","og_locale":"en_US","og_type":"article","og_title":"Run SQL Queries through Sage CRM Components - Sage CRM \u2013 Tips, Tricks and Components","og_description":"In our earlier post, we explained how to \u201cRe-install the Sage CRM component\u201d files from within Sage CRM. In this blog, we would discuss how &#8220;to execute SQL queries using Sage CRM components&#8221;. Sage CRM components allow users to add\/modify the Sage CRM screens, lists, menus, tabs etc.in a single attempt. Suppose you need to\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/","og_site_name":"Sage CRM \u2013 Tips, Tricks and Components","article_published_time":"2013-08-19T06:56:53+00:00","og_image":[{"url":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png","type":"","width":"","height":""}],"author":"greysagecrm","twitter_card":"summary_large_image","twitter_misc":{"Written by":"greysagecrm","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/","name":"Run SQL Queries through Sage CRM Components - Sage CRM \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#primaryimage"},"image":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#primaryimage"},"thumbnailUrl":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png","datePublished":"2013-08-19T06:56:53+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#primaryimage","url":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png","contentUrl":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2013\/08\/1.-Path.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/08\/19\/run-sql-queries-through-sage-crm-components\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/"},{"@type":"ListItem","position":2,"name":"Run SQL Queries through Sage CRM Components"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/","name":"Sage CRM \u2013 Tips, Tricks and Components","description":"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f","name":"greysagecrm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","caption":"greysagecrm"},"url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/4472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/comments?post=4472"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/4472\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/media?parent=4472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/categories?post=4472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/tags?post=4472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}