{"id":28211,"date":"2024-02-05T10:46:31","date_gmt":"2024-02-05T10:46:31","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=28211"},"modified":"2024-02-05T10:46:33","modified_gmt":"2024-02-05T10:46:33","slug":"guide-to-add-sql-query-in-sage-enterprise-intelligence-sei","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2024\/02\/05\/guide-to-add-sql-query-in-sage-enterprise-intelligence-sei\/","title":{"rendered":"Guide to add SQL Query in Sage Enterprise Intelligence (SEI)"},"content":{"rendered":"\n<p>If you need to retrieve data based on a more complex query than just selecting the field from a single table, you will need this feature. The SQL Query can be as much complicated as the database provider can support. This means that you could join tables, do summarization and grouping without any issues.<\/p>\n\n\n\n<p>Follow the below steps to achieve SQL Query:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>From the <em>Tables<\/em> window, in the upper left hand corner, click <strong>Add<\/strong> and select <strong>Add SQL Query<\/strong>.<\/li><\/ol>\n\n\n\n\n\n<p>2. In the <em>Destination Table Name<\/em> field, enter a name for the table destination.<\/p>\n\n\n\n<p>3. In the <em>SQL Expression<\/em> text box, enter the SQL statement and click <strong>Save<\/strong>.<\/p>\n\n\n\n\n\n<p><strong>Important:<\/strong><\/p>\n\n\n\n<p>Using of the schema name in the SQL statement is highly recommended.<\/p>\n\n\n\n<p><strong>Tip:<\/strong><\/p>\n\n\n\n<p>Variables can also be used to create queries in an SQL statement.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT * FROM TABLE WHERE YEAR = @YEAR<\/p>\n\n\n\n<p><strong>Note:<\/strong><\/p>\n\n\n\n<p>The QUERY will be added in the list.<\/p>\n\n\n\n\n\n<p>Once in the list, you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Do a mouse over to see the whole SQL statement,<\/li><li>Click on the QUERY hyperlink in the Table Source column to change the statement any time,<\/li><li>Apply a filter directly in the query statement (ex: select field1, sum(qty) from schema.table1 group by field1 where field2 = 2023) or in the row of the Filter column as a regular table If you are looking for more clarity.<\/li><\/ul>\n\n\n\n<p><strong>Tip:<\/strong><\/p>\n\n\n\n<p>You can also get access to the <em>Tables<\/em> windows by clicking on the hyperlink within the <em>Tables<\/em> column on the <em>Extraction<\/em> page.<\/p>\n\n\n\n<p><strong>About Us<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> &#8211; a globally recognized Premier Sage Gold Development Partner is a one-stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development and implementation expertise.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a>&nbsp;caters to a wide range of Sage X3 (Sage Enterprise Management) offerings &#8211; a Sage Business Cloud Solution. Our&nbsp;unique GUMU&#x2122; integrations include <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-x3-integration\">Sage X3 for Sage CRM<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\">Salesforce.com<\/a> and&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/magento-sage-integrations\/sage-x3-magento\">Magento eCommerce<\/a>&nbsp;along with Implementation and Technical Support worldwide for <a href=\"https:\/\/www.greytrix.com\/africa\/product\/consulting\/implementation-planning\">Sage X3<\/a> (Sage Enterprise Management). Currently we are <a href=\"https:\/\/www.greytrix.com\/africa\">Sage X3 Implementation Partner<\/a> in East Africa, Middles East, Australia, Asia.&nbsp;We also offer best-in-class&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\">Sage X3 customization and development services<\/a>,&nbsp;integrated applications such as <a href=\"https:\/\/www.greytrix.com\/product\/sage-enterprise-management-integration-services\/pos-system\">POS<\/a> | <a href=\"https:\/\/www.greytrix.com\/product\/sage-enterprise-management-integration-services\/warehouse-management-system\">WMS<\/a> | <a href=\"https:\/\/www.greytrix.com\/product\/sage-enterprise-management-integration-services\/payment-gateway\">Payment Gateway<\/a> | <a href=\"https:\/\/www.greytrix.com\/product\/sage-enterprise-management-integration-services\/shipping-system\">Shipping System<\/a> | <a href=\"https:\/\/www.greytrix.com\/product\/sage-enterprise-management-integration-services\/business-intelligence\">Business Intelligence<\/a> | <a href=\"https:\/\/www.greytrix.com\/product\/sage-x3\/ecommerce-magento-integration\">eCommerce<\/a> and have developed add-ons such as <a href=\"https:\/\/www.greytrix.com\/product\/sage-enterprise-management-add-ons\/catch-weight\">Catch \u2013 Weight <\/a>&nbsp;and <a href=\"https:\/\/www.greytrix.com\/product\/sage-enterprise-management-add-ons\/letter-of-credit\">Letter of Credit<\/a> for Sage X3 to Sage business partners, end users and Sage PSG worldwide.<\/p>\n\n\n\n<p>Greytrix is a recognized <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2017\/07\/26\/greytrix-on-boards-sage-global-rockstar-isv-program-with-gumu-for-sage-crm-sage-x3-solution\/\">Sage Rockstar ISV Partner<\/a> for GUMU&#x2122; Sage X3 &#8211; Sage CRM integration also listed on <a href=\"https:\/\/www.sage.com\/marketplace\/asb_ListingDetail?listingId=a1h24000007PC3aAAG\" target=\"_blank\" rel=\"noopener\">Sage Marketplace<\/a>; GUMU&#x2122; integration for Sage X3 &#8211; Salesforce is a 5-star app listed on <a href=\"https:\/\/appexchange.salesforce.com\/listingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noopener\">Salesforce AppExchange<\/a>.<\/p>\n\n\n\n<p>For more information on Sage X3 Integration and Services, please contact us at&nbsp;<a href=\"mailto:x3@greytrix.com\">x3@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you need to retrieve data based on a more complex query than just selecting the field from a single table, you will need this feature. The SQL Query can be as much complicated as the database provider can support. This means that you could join tables, do summarization and grouping without any issues. Follow\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2024\/02\/05\/guide-to-add-sql-query-in-sage-enterprise-intelligence-sei\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5,3162,13,8,3642,9,10,2796,11],"tags":[3080,1593,1822,1839,2871,1945,1981,3968,2143,2233],"class_list":["post-28211","post","type-post","status-publish","format-standard","hentry","category-configuration","category-features","category-greytrix","category-integration","category-sage-erp-x3","category-sage-x3","category-sage-x3-consulting","category-standard","category-technical","category-tips","tag-invoices","tag-query","tag-sage-x3","tag-sage-x3-blogs","tag-sage-x3-functional-blogs","tag-sage-x3-technical-blogs","tag-sales-invoices","tag-sql-expression","tag-sql-query","tag-tables"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/28211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=28211"}],"version-history":[{"count":1,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/28211\/revisions"}],"predecessor-version":[{"id":28216,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/28211\/revisions\/28216"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=28211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=28211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=28211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}