<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title> &#187; Formatted Search</title>
	<atom:link href="http://www.90minds.com/category/sap-business-one/formatted-search/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.90minds.com</link>
	<description></description>
	<lastBuildDate>Sat, 11 Feb 2012 22:14:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>SAP Business One Retrieving the Ship-To State for a Sales Order</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-retrieving-the-ship-to-state-for-a-sales-order/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-retrieving-the-ship-to-state-for-a-sales-order/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:58:10 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>
		<category><![CDATA[Reporting]]></category>
		<category><![CDATA[UDF (User Defined Fields)]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-retrieving-the-ship-to-state-for-a-sales-order/</guid>
		<description><![CDATA[It was important to one client to be able to do sales reporting by state (which was done using the query tool). In SBO, the address on the marketing documents is one large field and you cannot get the state unless you get the information from the BP (Business Partner) master for scan through the [...]]]></description>
			<content:encoded><![CDATA[<p>It was important to one client to be able to do sales reporting by state (which was done using the query tool). In SBO, the address on the marketing documents is one large field and you cannot get the state unless you get the information from the BP (Business Partner) master for scan through the field for specific characters and pull out the state information. </p>
<ol>
<li><a href="http://sbonotes.blogspot.com/2007/07/creating-user-defined-field-for.html">Create a UDF (User Defined Field)</a> for the marketing document header.</li>
<li><a href="http://sbonotes.blogspot.com/2007/07/creating-custom-queries.html">Create a custom query</a> and insert the code below into the query statement area. The query below will take the <em>Ship-To Code</em> selected and go to the Business Partner Master and get the correct Ship-To State. It will also look for a comma on a custom address (where a ship to code is not selected) and pull the state code from the two characters after the &quot;, &quot;:      <br />Select Case When $[ShipToCode] = &#8216; &#8216; Then Case When CHARINDEX(&#8216;,&#8217;,$[Address2])= 0 Then &#8216;??&#8217; Else Substring($[Address2], CHARINDEX(&#8216;,&#8217;,$[Address2])+1,2) END Else (Select ADR.State From CRD1 ADR Where $[CardCode] = ADR.CardCode and $[ShipToCode] = ADR.Address and ADR.ADRESTYPE = &#8216;S&#8217;)END</li>
<li>Now you can <a href="http://sbonotes.blogspot.com/2007/07/assigning-form-query-to-field.html">tie a query to the UDF (User Defined Field)</a> you created on a Marketing Document. You will have to assign the query on each marketing document you want the query to run on (e.g., Sales Order, Delivery Doc, etc.). <strong>Note: This query was assigned to run automatically when the <em>Ship to </em>field changed.</strong> That can be assigned on the Search Definition on the field.</li>
</ol>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-retrieving-the-ship-to-state-for-a-sales-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Business One Creating a User Defined Field for Marketing Documents &#8211; Basic</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-creating-a-user-defined-field-for-marketing-documents-basic/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-creating-a-user-defined-field-for-marketing-documents-basic/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:56:59 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[UDF (User Defined Fields)]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-creating-a-user-defined-field-for-marketing-documents-basic/</guid>
		<description><![CDATA[Backup your database. Get everyone out of the system. Create a UDF (User Defined Field) (Tools-&#62;User-Defined Fields) at the marketing document header by clicking on the yellow (or gold) arrow to the left of the Marketing Documents row. Look for the row below that called Title and click on it. In the Lower right hand [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Backup your database. Get everyone out of the system.</li>
<li>Create a UDF (User Defined Field) (<em>Tools-&gt;User-Defined Fields</em>) at the marketing document header by clicking on the yellow (or gold) arrow to the left of the <em>Marketing Documents </em>row. </li>
<li><a href="http://4.bp.blogspot.com/_1ULSO0XKfTI/Ro5_0OiD6nI/AAAAAAAAABM/c39LSnG1L48/s1600-h/UDF_Add_State_Field.jpg" rel="lightbox[319]"></a>Look for the row below that called <em>Title</em> and click on it. In the Lower right hand corner is a Add button. </li>
<li>Click on the Add Button a window appears.     <br /><img alt="" src="http://1.bp.blogspot.com/_1ULSO0XKfTI/Ro6E2eiD6pI/AAAAAAAAABc/RyrXTVTM_1o/s320/UDF_Add_State_Field.jpg" border="0" />This window will allow you to add a new field to the Database and it will allow you to access that field on the marketing documents (such as the sales order).</li>
<li>Click the Add button after you have completed the required fields. There will be some warnings and such&#8230;no worries. </li>
<li>Close all screen and return to the main menu. </li>
<li>Go to a marketing document (such as a sales order) and then, select from the drop down menu at the top of the screen: <em>View-&gt;User Defined Fields</em>. The screen will probably re-draw and a new box to the right of the main sales order screen will appear. You will see the field you created.      <br /><img alt="" src="http://2.bp.blogspot.com/_1ULSO0XKfTI/Ro6FhuiD6qI/AAAAAAAAABk/tzJ1qwBXXP0/s320/Show_UDF.jpg" border="0" /></li>
</ol>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-creating-a-user-defined-field-for-marketing-documents-basic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Business One Assigning a Formatted Search Query to a Field</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-assigning-a-formatted-search-query-to-a-field/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-assigning-a-formatted-search-query-to-a-field/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:54:59 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-assigning-a-formatted-search-query-to-a-field/</guid>
		<description><![CDATA[Instuctions on how to assign a form query to a field: Open a form. Click on the field. Select for the drop down menus at the top of the screen: Tools-&#62;Search Function-&#62;Define A window will appear. Click on Search by Saved Query. Double Click on the long gray box below that option. The Query Manager [...]]]></description>
			<content:encoded><![CDATA[<p>Instuctions on how to assign a form query to a field:</p>
<ol>
<li>Open a form.</li>
<li>Click on the field.</li>
<li>Select for the drop down menus at the top of the screen:     <br /><em><strong>Tools-&gt;Search Function-&gt;Define</strong>        <br /><img alt="" src="http://1.bp.blogspot.com/_1ULSO0XKfTI/Ro6SreiD6tI/AAAAAAAAAB8/-R_rXib_f7Y/s320/Assign_Form_Query.jpg" border="0" /></em></li>
<li>A window will appear. <strong>Click on <em>Search by Saved Query</em></strong>. Double Click on the long gray box below that option. The Query Manager will open. Select the query you wish to run on the field you selected.      <br /><img alt="" src="http://4.bp.blogspot.com/_1ULSO0XKfTI/Ro6SUOiD6sI/AAAAAAAAAB0/NMbzcWkxuEc/s320/Assign_Form_Query_Window.jpg" border="0" />      <br />If you would like to have the value automatically populate when something else happens on the form, check the <strong><em>Auto Refresh When Field Changes </em></strong>box. From the drop down box below that option, select the field that will &quot;trigger&quot; the query to run on the field you selected.</li>
<li>To run the query on demand on the form, press <strong><em>Alt+F2</em></strong>. To change the field&#8217;s query assignment later you can press <strong><em>Alt+Shift+F2</em></strong> and the window above will be displayed. You can also follow the original drop down menu path listed above to perform the same action.</li>
</ol>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-assigning-a-formatted-search-query-to-a-field/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SAP Business One: High Quantity on a Sales Order</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-high-quantity-on-a-sales-order/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-high-quantity-on-a-sales-order/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:45:51 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Alerts]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>
		<category><![CDATA[Reporting]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-high-quantity-on-a-sales-order/</guid>
		<description><![CDATA[Use this query to check for high order quantities on a Sales Orders. If you make an alert out of this query, then you can be notified when potential keying errors occur. /* Shows all sales orders where the qty ordered is greater */ /* than or equal to the amount within the WHERE Clause [...]]]></description>
			<content:encoded><![CDATA[<p>Use this query to check for high order quantities on a <em>Sales Orders</em>. </p>
<p>If you make an alert out of this query, then you can be notified when potential keying errors occur. </p>
<p>/* Shows all sales orders where the qty ordered is greater */   <br />/* than or equal to the amount within the WHERE Clause below */    <br />Select     <br />DocNum as &#8216;Order#&#8217;    <br />,itemcode as &#8216;Item#&#8217;    <br />,dscription as &#8216;Description&#8217;    <br />,Quantity    <br />,Gtotal &#8216;Line Total&#8217;    <br />,cardcode as &#8216;BP&#8217;    <br />,cardname as &#8216;BP Name&#8217;</p>
<p>FROM rdr1 dtl   <br />INNER JOIN ordr hdr on dtl.docentry = hdr.docentry</p>
<p>WHERE   <br />Linestatus = &#8216;O&#8217;    <br />and Quantity&gt;=100</p>
<p>Order By DocNum, LineNum   <br />FOR BROWSE</p>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-high-quantity-on-a-sales-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Business One: Query to Show Customers Without Sales Employees Assigned</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-query-to-show-customers-without-sales-employees-assigned/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-query-to-show-customers-without-sales-employees-assigned/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:44:59 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Alerts]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>
		<category><![CDATA[Reporting]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-query-to-show-customers-without-sales-employees-assigned/</guid>
		<description><![CDATA[Use the query to show all of the customers that do not have sales employees assigned. You can use this as an alert as well. SELECT CardCode as BP, CardName as &#8216;Customer Name&#8217; FROM OCRD Where SLPCODE = -1 and CardType = &#8216;C&#8217; FOR BROWSE Thanks to Ed Monk of SBONotes.com &#169; 2009, Mark Chinsky. [...]]]></description>
			<content:encoded><![CDATA[<p>Use the query to show all of the customers that do not have sales employees assigned. You can use this as an alert as well.</p>
<p>SELECT CardCode as BP, CardName as &#8216;Customer Name&#8217; FROM OCRD Where SLPCODE = -1 and CardType = &#8216;C&#8217; FOR BROWSE</p>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-query-to-show-customers-without-sales-employees-assigned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Business One Simplified Order Guides for Sales Orders</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-simplified-order-guides-for-sales-orders/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-simplified-order-guides-for-sales-orders/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:43:34 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>
		<category><![CDATA[Reporting]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-simplified-order-guides-for-sales-orders/</guid>
		<description><![CDATA[Use this query to display a list of items that a customer likes to buy. It was made to be placed on the Item Number field on the Sales Order as a Formatted Search. The User will press Shift + F2 to display the window as opposed to pressing tab to display the entire catalog [...]]]></description>
			<content:encoded><![CDATA[<p>Use this query to display a list of items that a customer likes to buy. It was made to be placed on the Item Number field on the Sales Order as a Formatted Search. The User will press Shift + F2 to display the window as opposed to pressing tab to display the entire catalog of items.   <br />Changing the <em>Where</em> clause to be a parameter will enable you to produce a printed order guide for a customer. If you would like to try out the query without making it a formatted search, just change the <em>$[$-4.0.0]</em> to your favorite customer number surrounded by single quotes.</p>
<p>SELECT DISTINCT     <br />dtl.itemcode &#8216;Item&#8217;    <br />,itm.itemname &#8216;Item Description&#8217;    <br />,ROUND(AVG(quantity),0) &#8216;Avg Ord&#8217;    <br />,AVG(dtl.Price) &#8216;Avg Price&#8217;    <br />,AVG(ROUND(CASE WHEN dtl.linetotal = 0 THEN 0 ELSE dtl.grssProfit/dtl.linetotal END,2))*100 &#8216;AvgGP%&#8217;</p>
<p>,Count(docnum) &#8216;Total Orders&#8217;    <br />,MAX(hdr.docdate) &#8216;Last Ordered&#8217;     <br />,hdr.CardCode</p>
<p>FROM rdr1 dtl    <br />INNER JOIN ordr hdr on dtl.docentry = hdr.docentry    <br />INNER JOIN oitm itm on dtl.itemcode = itm.itemcode    <br />WHERE HDR.cardcode = $[$-4.0.0]    <br />GROUP BY hdr.cardcode, dtl.itemcode, itm.itemname    <br />FOR BROWSE</p>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-simplified-order-guides-for-sales-orders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Business One How To Enter a User Defined Table (UDT) in Query</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-how-to-enter-a-user-defined-table-udt-in-query/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-how-to-enter-a-user-defined-table-udt-in-query/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:42:09 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-how-to-enter-a-user-defined-table-udt-in-query/</guid>
		<description><![CDATA[When referring to a User Defined Table (UDT) in Query use the following syntax: [dbo].[@Table_Name] &#160; Thanks to Ed Monk of SBONotes.com &#169; 2009, Mark Chinsky. All rights reserved. Formed in 2005. the 90 Minds Consulting Group is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private [...]]]></description>
			<content:encoded><![CDATA[<p>When referring to a User Defined Table (UDT) in Query use the following syntax:   <br />[dbo].[@<em>Table_Name</em>]</p>
<p>&#160;</p>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-how-to-enter-a-user-defined-table-udt-in-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Business One: Commonly Used Tables for Queries</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-commonly-used-tables-for-queries/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-commonly-used-tables-for-queries/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:41:22 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Alerts]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>
		<category><![CDATA[Reporting]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-commonly-used-tables-for-queries/</guid>
		<description><![CDATA[For those who would like to try their hand at doing some queries for formatted searches, alerts, or reports, but do not know what the common table names are, here is a short list. Check back and I will update the list from time to time. Master Files: OITM = Item Master OCRD = Customer, [...]]]></description>
			<content:encoded><![CDATA[<p>For those who would like to try their hand at doing some queries for formatted searches, alerts, or reports, but do not know what the common table names are, here is a short list. Check back and I will update the list from time to time.</p>
<p>Master Files:    <br />OITM = Item Master    <br />OCRD = Customer, Vendor, and Lead Master    <br />CRD1 = Customer Master Address    <br />OCRG = Customer Master Group Code    <br />OHEM = Employee Master    <br />OUSR = SBO Users</p>
<p>Document Files:    <br />ORDR = Sales Order Header    <br />RDR1 = Sales Order Detail (Items) </p>
<p>OINV = Invoice Header   <br />INV1 = Invoice Line Details (Items)</p>
<p>&#160;</p>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-commonly-used-tables-for-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Business One Formatted Search: Default the State Tax Code</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-formatted-search-default-the-state-tax-code/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-formatted-search-default-the-state-tax-code/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:40:17 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-formatted-search-default-the-state-tax-code/</guid>
		<description><![CDATA[If you would like to default the Customer Ship-To Tax Code to a specific value, create a query and paste in the SQL at the bottom of the post. Change the the insert your default value where noted and create a formatted search, triggered off of the address name, on the State Tax Code field. [...]]]></description>
			<content:encoded><![CDATA[<p>If you would like to default the Customer Ship-To Tax Code to a specific value, create a query and paste in the SQL at the bottom of the post. Change the the insert your default value where noted and create a formatted search, triggered off of the address name, on the State Tax Code field. The query will retain any values that already exist in the field.   <br />SELECT    <br />Case When $[$-178.12.0] = &#8221;    <br />Then &#8217;0&#8242; /* Insert your default code within the single quotes */    <br />Else $[$-178.12.0]    <br />End As Code</p>
<p>&#160;</p>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-formatted-search-default-the-state-tax-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Business One The Anatomy of a SQL Statement: Rename your columns and tables (Part 3)</title>
		<link>http://www.90minds.com/2009/02/11/sap-business-one-the-anatomy-of-a-sql-statement-rename-your-columns-and-tables-part-3/</link>
		<comments>http://www.90minds.com/2009/02/11/sap-business-one-the-anatomy-of-a-sql-statement-rename-your-columns-and-tables-part-3/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:29:08 +0000</pubDate>
		<dc:creator>Mark Chinsky</dc:creator>
				<category><![CDATA[Alerts]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Formatted Search]]></category>
		<category><![CDATA[Queries]]></category>

		<guid isPermaLink="false">http://www.90minds.com/2009/02/11/sap-business-one-the-anatomy-of-a-sql-statement-rename-your-columns-and-tables-part-3/</guid>
		<description><![CDATA[Using the example from the previous lesson, lets look at how we can make a SQL query more user friendly. SELECT ItemCode, ItemName FROM OITM The fields ItemCode and ItemName will appear as the column names for the data when the query is executed. Many times the field names (the ones from the actual table) [...]]]></description>
			<content:encoded><![CDATA[<p>Using the example from the previous lesson, lets look at how we can make a SQL query more user friendly.</p>
<p>SELECT ItemCode, ItemName FROM OITM    <br />The fields ItemCode and ItemName will appear as the column names for the data when the query is executed. Many times the field names (the ones from the actual table) do not accurately express what the field means. To rename the field to something else you can specify the new name right after the field name.</p>
<p>SELECT ItemCode AS Item, ItemName AS Description FROM OITM    <br />The &#8220;AS&#8221; keyword is not required, but aids in readability, so this syntax is also valid:</p>
<p>SELECT ItemCode Item, ItemName Description FROM OITM</p>
<p>If you attempt to use a special character (such as &#8220;#&#8221;) you may encounter issues. Enclose the new name in quotes and SBO will accept the name.    <br />As your queries become more complicated, you will have the desire to rename the files used within the query to make them easier to reference to. Additionally, when you have two files that have fields with the same field name, you must specify the file name and the field name every time you refer to the field in the query. For example, there is an ItemCode field in the Item Master (OITM) and the Order Detail (RDR1). Since both fields have the same name, you will have to specify the file name then the field name to tell the system which field you are referring to. If two files were being used in the previous query, then I would need to specify the file name too. The query below produces the same results as the previous examples:</p>
<p>SELECT OITM.ItemCode AS Item, OITM.ItemName AS Description FROM OITM    <br />If you had a large number of fields that you were selecting from one or more files it may become cumbersome to type &#8220;OITM&#8221; over and over again. You can rename it to something shorter. When you use the query tools from SBO, the system will rename the files for you. SBO renames the files to &#8220;Tn&#8221; (i.e., T0 for table one, T1 for table two). You can rename the files by specifying the new name    <br />right after the file name (in this case the file name is OITM for the item master file).</p>
<p>SELECT it.ItemCode AS Item, it.ItemName AS Description FROM OITM it</p>
<p>As you can see above, the shorter file name will make it a little easier to add lots of fields.</p>
<p>Thanks to Ed Monk of <a href="http://www.sbonotes.com">SBONotes.com</a></p>
<p style='text-align:left'>&copy; 2009, <a href='http://www.90minds.com'>Mark Chinsky</a>. All rights reserved. Formed in 2005. the  90 Minds Consulting Group  is a collaboration of 100 Sage partners who independently join together online in a 24 x 7 private communication network to solve difficult issues for their customers.  The group is not affiliated with Sage  and our collaboration provides for unparalleled member access to early warnings of bugs and other issues which members in turn are encouraged to use to provide an exceptional customer experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.90minds.com/2009/02/11/sap-business-one-the-anatomy-of-a-sql-statement-rename-your-columns-and-tables-part-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

