<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Real Life Dynamics User</title>
	<atom:link href="http://rldu.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rldu.wordpress.com</link>
	<description>Real Life Experiences With Microsoft Dynamics GP / CRM</description>
	<lastBuildDate>Fri, 27 Jan 2012 14:12:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='rldu.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/bed57b44af492230455d71023b7b9ee5?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Real Life Dynamics User</title>
		<link>http://rldu.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://rldu.wordpress.com/osd.xml" title="Real Life Dynamics User" />
	<atom:link rel='hub' href='http://rldu.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SQL Scripts&#8211;Vendor Invoice Pricing Discrepancy</title>
		<link>http://rldu.wordpress.com/2011/09/14/sql-scriptsvendor-invoice-pricing-discrepancy/</link>
		<comments>http://rldu.wordpress.com/2011/09/14/sql-scriptsvendor-invoice-pricing-discrepancy/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 18:23:00 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Views]]></category>
		<category><![CDATA[Payables]]></category>
		<category><![CDATA[Purchase Order Processing]]></category>
		<category><![CDATA[sql alerts]]></category>
		<category><![CDATA[SQL Scripts]]></category>

		<guid isPermaLink="false">https://rldu.wordpress.com/2011/09/14/sql-scriptsvendor-invoice-pricing-discrepancy/</guid>
		<description><![CDATA[The following SQL Script will show you all Payables invoices that have been entered into your system where the price your vendor is charging does not match the price of your purchase order.&#160; We use this, in conjunction with Task Centre, to alert us when a vendor has charged us more than what our purchase [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=369&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following SQL Script will show you all Payables invoices that have been entered into your system where the price your vendor is charging does not match the price of your purchase order.&#160; </p>
<p>We use this, in conjunction with Task Centre, to alert us when a vendor has charged us more than what our purchase order was submitted for.&#160; Very valuable when you have a payables clerk processing 100’s of invoices a day (it is easy for them to make a mistake).</p>
<p><em>This script has options for total amount of discrepancy.&#160; This allows you to “tweak” the script to not show line items that are off a couple of pennies (or whatever tolerance you wish).&#160; </em></p>
<p><em>We actually use $5, so that is set as default in the script.&#160; </em><em>To change, replace the value in line 2 (SET @dollar_amount=5), to whatever dollar value you want.&#160; DO NOT INCLUDE THE DECIMALS.</em></p>
<p><strong>**SQL Script***</strong></p>
<p>DECLARE @dollar_amount INT   <br />SET @dollar_amount = 5</p>
<p>select&#160; [Invoice_Date] = c.receiptdate,   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [PO_Number] = a.po_number,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [POP_Type] = case when c.poptype = &#8217;1&#8242; then &#8216;Shipment&#8217;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; when c.poptype = &#8217;2&#8242; then &#8216; Invoice&#8217;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; when c.poptype = &#8217;3&#8242; then &#8216;Shipment/Invoice&#8217;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else &#8216;N/A&#8217;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [PO_Date] = po_date,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Vendor_ID] = vendor_id,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Vendor_Name] = vendor_name,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Item_Number] = d.itemnmbr,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Item_Desc] = d.itemdesc,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [PO_Qty] = d.qtyorder,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Inv Unit Cost] = b.unitcost,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [PO Unit Cost] = d.unitcost,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Created_By] = c.user2ent    <br />from&#160;&#160;&#160; tspvpurchaseorder a    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; join pop30310 b on a.po_number = b.ponumber    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; join pop30300 c on b.poprctnm = c.poprctnm    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; join pop10110 d on a.po_number = d.ponumber    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND b.itemnmbr = d.itemnmbr    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND b.itemdesc = d.itemdesc    <br />where&#160;&#160; ( ( b.unitcost &#8211; d.unitcost ) &gt; @dollar_amount )    <br />order by po_number desc</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=369&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/09/14/sql-scriptsvendor-invoice-pricing-discrepancy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Scripts&#8211;SOP to POP Freight Analysis</title>
		<link>http://rldu.wordpress.com/2011/09/13/sql-scriptssop-to-pop-freight-analysis/</link>
		<comments>http://rldu.wordpress.com/2011/09/13/sql-scriptssop-to-pop-freight-analysis/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 20:27:58 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[From The Community]]></category>
		<category><![CDATA[Purchase Order Processing]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[sql alerts]]></category>
		<category><![CDATA[SQL Scripts]]></category>

		<guid isPermaLink="false">https://rldu.wordpress.com/2011/09/13/sql-scriptssop-to-pop-freight-analysis/</guid>
		<description><![CDATA[The following SQL Script will show analyze the freight you charged to a customer versus the freight you were billed from you vendor provided there is a SOP to POP link between the sales order and purchase order. This question was raised in the Dynamics GP Community by JCohen: We are looking for a way [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=378&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following <a href="https://rldu.wordpress.com/sql-scripts-views/">SQL Script</a> will show analyze the freight you charged to a customer versus the freight you were billed from you vendor provided there is a SOP to POP link between the sales order and purchase order.</p>
<p>This question was raised in the Dynamics GP Community by JCohen:</p>
<blockquote><p>We are looking for a way to associate outgoing freight charges from 3rd party carriers (not invoiced to customers) with applicable sales invoices in order to better track the profitability of customers. It seems, to me, that it is the flip-side of landed costs but I have not found a way to link them. Any suggestions?</p>
</blockquote>
<p><a href="https://community.dynamics.com/product/gp/f/32/t/63015.aspx">https://community.dynamics.com/product/gp/f/32/t/63015.aspx</a></p>
<p><strong>***SQL Script***</strong></p>
<p>SELECT&#160; a.Sales_Doc_Num,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; c.DOCNUMBR Payables_Document,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; c.PORDNMBR PO_Number,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; c.POSTEDDT Posted_Date,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; c.FRTAMNT Vendor_Freight_Amount,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; a.Freight Sales_Freight_Charged,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Freight_Diff]=a.Freight-c.FRTAMNT     <br />FROM&#160;&#160;&#160; dbo.tspvSalesDocumentHistory a     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; JOIN dbo.tspvSopToPop b ON a.Sales_Doc_Num = b.Sales_Doc_Num     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; JOIN pm30200 c ON b.PO_Number = c.PORDNMBR</p>
<p><strong>***One thing to note, since this script combines Sales Document Headers and Purchase Line Items (Headers vs Details) the freight analysis for each Sales Order will be repeated for the number of lines on the Purchase Order.&#160; This can easily be cleaned up in a report.&#160; Feel free to <a href="https://rldu.wordpress.com/contact-me/">Contact Me</a> if you need any help.***</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/378/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=378&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/09/13/sql-scriptssop-to-pop-freight-analysis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Scripts&#8211;Invoices Coming Due Next Week</title>
		<link>http://rldu.wordpress.com/2011/09/12/sql-scriptsinvoices-coming-due-next-week/</link>
		<comments>http://rldu.wordpress.com/2011/09/12/sql-scriptsinvoices-coming-due-next-week/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 18:00:48 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Receivables]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[sql alerts]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Views]]></category>

		<guid isPermaLink="false">https://rldu.wordpress.com/2011/09/12/sql-scriptsinvoices-coming-due-next-week/</guid>
		<description><![CDATA[The following SQL View shows you all invoices that are coming due next week.&#160; We use this view in conjunction with Task Centre to send out a list (fax or email) to our customers of invoices will be due next week.&#160; This has really helped our aging process and past due invoices.&#160; Our customers have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=363&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following <a href="https://rldu.wordpress.com/sql-scripts-views/" target="_blank">SQL View</a> shows you all invoices that are coming due next week.&#160; We use this view in conjunction with <a href="https://rldu.wordpress.com/resources/" target="_blank">Task Centre</a> to send out a list (fax or email) to our customers of invoices will be due next week.&#160; This has really helped our aging process and past due invoices.&#160; Our customers have expressed an appreciation for this friendly reminder.</p>
<p><strong>***SQL Script***</strong></p>
<p>select * from    <br />(select custnmbr, docnumbr, duedate, cspornbr, docdate, ortrxamt, curtrxam from rm20101     <br />&#160;&#160;&#160; where duedate &gt;= dateadd(wk, datediff(wk, 0, getdate())+1,0)-1     <br />&#160;&#160;&#160; and duedate &lt; dateadd(wk, datediff(wk, 0, getdate())+2,0)-1) A     <br />left join     <br />(select custnmbr, custname, cntcprsn, stmtname, adrscode, address1, address2, address3, city, state, zip, phone1, phone2, phone3, fax, slprsnid, pymtrmid from rm00101) B     <br />on a.custnmbr = b.custnmbr     <br />left join     <br />(select customer_num, invoiceStatementTo from spvcustomer) C     <br />on a.custnmbr = c.customer_num     <br />order by a.custnmbr asc, a.docnumbr asc</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/363/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=363&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/09/12/sql-scriptsinvoices-coming-due-next-week/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>Packt Publishing&#8211;Dynamics GP 2010 Reporting</title>
		<link>http://rldu.wordpress.com/2011/09/08/packt-publishingdynamics-gp-2010-reporting/</link>
		<comments>http://rldu.wordpress.com/2011/09/08/packt-publishingdynamics-gp-2010-reporting/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 01:08:00 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">https://rldu.wordpress.com/2011/09/08/packt-publishingdynamics-gp-2010-reporting/</guid>
		<description><![CDATA[If you have some time, check out Dynamics GP 2010 Reporting from Packt Publishing.&#160; This book will give you some great information with regards to reporting and Dynamics GP.&#160; Whether you are looking to utilize the built in reporting tools such as Smart Lists and Report Writer, or if you are looking to dive a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=356&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have some time, check out <a href="http://link.packtpub.com/R3RWT6" target="_blank">Dynamics GP 2010 Reporting</a> from Packt Publishing.&#160; This book will give you some great information with regards to reporting and Dynamics GP.&#160; </p>
<p>Whether you are looking to utilize the built in reporting tools such as Smart Lists and Report Writer, or if you are looking to dive a little deeper into SQL, Excel, or Smart List Builder, this book is for you.&#160; This book also has a nice breakdown of how the Dynamics GP databases are structured.&#160; Between what this book teaches and Victoria Yudin’s list of <a href="http://victoriayudin.com/gp-tables/" target="_blank">GP Tables</a>, you should have all the tools you need to get started writing your own reports.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=356&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/09/08/packt-publishingdynamics-gp-2010-reporting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Scripts&#8211;Order Count&#8211;YTD By User</title>
		<link>http://rldu.wordpress.com/2011/09/06/sql-scriptsorder-countytd-by-user/</link>
		<comments>http://rldu.wordpress.com/2011/09/06/sql-scriptsorder-countytd-by-user/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 00:50:00 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[RLDU]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Inventory]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[sql alerts]]></category>
		<category><![CDATA[SQL Scripts]]></category>

		<guid isPermaLink="false">https://rldu.wordpress.com/2011/09/06/sql-scriptsorder-countytd-by-user/</guid>
		<description><![CDATA[Following up on my last script, SQL Scripts–Order Count–Previous Week By User, this script will show you the number of orders entered by user for the current year. ***Note that you will need to make sure the @doc_date is set to January 1st of the current year*** This script uses the following views: - Historical [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=354&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following up on my last script, <a href="http://rldu.wordpress.com/2011/09/01/sql-scriptsorder-countprevious-week-by-user/">SQL Scripts–Order Count–Previous Week By User</a>, this script will show you the number of orders entered by user for the current year.</p>
<p>***Note that you will need to make sure the @doc_date is set to January 1st of the current year***</p>
<p>This script uses the following views:</p>
<blockquote><p>- <a href="http://rldu.wordpress.com/2010/05/26/sql-view-sales-documents-history/">Historical Sales Documents</a> (tspvSalesDocuementHistory)</p></blockquote>
<p>DECLARE @doc_date DATETIME</p>
<p>&#8211;Set @doc_date to January 1st of the current year–<br />
SET @doc_date = &#8217;1/1/2010&#8242;</p>
<p>SELECT  created_by,<br />
[Orders_Entered] = COUNT(*)<br />
FROM    dbo.tspvSalesDocumentHistory<br />
WHERE   Doc_Date &gt;= @doc_date<br />
AND Sales_Doc_Type = &#8216;order&#8217;<br />
GROUP BY Created_By<br />
ORDER BY orders_entered desc</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=354&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/09/06/sql-scriptsorder-countytd-by-user/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Scripts&#8211;Order Count&#8211;Previous Week By User</title>
		<link>http://rldu.wordpress.com/2011/09/01/sql-scriptsorder-countprevious-week-by-user/</link>
		<comments>http://rldu.wordpress.com/2011/09/01/sql-scriptsorder-countprevious-week-by-user/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 17:45:00 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Inventory]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[sql alerts]]></category>
		<category><![CDATA[SQL Scripts]]></category>

		<guid isPermaLink="false">https://rldu.wordpress.com/2011/09/01/sql-scriptsorder-countprevious-week-by-user/</guid>
		<description><![CDATA[Do you ever wonder what your sales order workload looks like for you customer service staff?&#160; This script will show you the number of orders entered by user for last week. ***Note that you will need to make sure the @doc_date is set to January 1st of the current year*** This script uses the following [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=353&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Do you ever wonder what your sales order workload looks like for you customer service staff?&#160; This script will show you the number of orders entered by user for last week.</p>
<p>***Note that you will need to make sure the @doc_date is set to January 1st of the current year***</p>
<p>This script uses the following views:</p>
<blockquote><p><font color="#444444">- <a href="http://http://rldu.wordpress.com/2010/04/07/sql-view-sales-documents/" target="_blank">Open Sales Documents</a> (tspvSalesDocument)</font></p>
<p><font color="#444444">- <a href="http://rldu.wordpress.com/2010/05/26/sql-view-sales-documents-history/" target="_blank">Historical Sales Documents</a> (tspvSalesDocuementHistory)</font></p>
</blockquote>
<p>DECLARE @doc_date DATETIME</p>
<p>&#8211;Set @doc_date to January 1st of the current year&#8211;   <br />SET @doc_date = &#8217;1/1/2011&#8242;</p>
<p>SELECT&#160; created_by,   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Week] = DATEPART(ww, doc_date),    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Orders_Entered] = COUNT(*)    <br />FROM&#160;&#160;&#160; ( select&#160;&#160;&#160; Created_By,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Doc_Date    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; from&#160;&#160;&#160;&#160;&#160; tspvSalesDocumentHistory    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; WHERE&#160;&#160;&#160;&#160; Doc_Date &gt;= @doc_date    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND Sales_Doc_Type = &#8216;order&#8217;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND Original_Num = &#8221;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; union all    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; select&#160;&#160;&#160; Created_By,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Doc_Date    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FROM&#160;&#160;&#160;&#160;&#160; tspvSalesDocument    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; WHERE&#160;&#160;&#160;&#160; Doc_Date &gt;= @doc_date    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND Sales_Doc_Type = &#8216;order&#8217;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND Original_Num = &#8221;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ) as combined    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; WHERE DATEPART(ww,combined.Doc_Date) = DATEPART(ww,GETDATE()-7)    <br />GROUP BY Created_By,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; DATEPART(ww, doc_date)    <br />ORDER BY DATEPART(ww, Doc_Date),    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Created_By </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/353/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=353&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/09/01/sql-scriptsorder-countprevious-week-by-user/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Script &#8211; Orders Needing Purchase</title>
		<link>http://rldu.wordpress.com/2011/08/20/sql-script-orders-needing-purchase/</link>
		<comments>http://rldu.wordpress.com/2011/08/20/sql-script-orders-needing-purchase/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 03:48:41 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Views]]></category>
		<category><![CDATA[Purchase Order Processing]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[sql alerts]]></category>
		<category><![CDATA[SQL Views]]></category>

		<guid isPermaLink="false">http://rldu.wordpress.com/?p=318</guid>
		<description><![CDATA[So&#8230;you know that you had something that you needed to order for a customer, but you cannot remember what it is to save your life?  Well the following view will show you a listing of all open sales order with line items that need to be purchased.  Whether the line item is back ordered, or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=318&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So&#8230;you know that you had something that you needed to order for a customer, but you cannot remember what it is to save your life?  Well the following view will show you a listing of all open sales order with line items that need to be purchased.  Whether the line item is back ordered, or a drop ship, this view will show you what needs to be purchased (or linked to an existing purchase order).</p>
<p>This script uses the following views:</p>
<blockquote><p><a title="SQL View – Sales Documents" href="http://rldu.wordpress.com/2010/04/07/sql-view-sales-documents/" target="_blank">Sales Document</a> (tspvSalesDocument)</p>
<p><a title="SQL View – Sales Line Items" href="http://rldu.wordpress.com/2010/04/08/sql-view-sales-line-items/" target="_blank">Sales Line Item</a> (tspvSalesLineItem)</p></blockquote>
<p>***SQL Script***<br />
SELECT  a.Sales_Doc_Num,<br />
        Doc_Date,<br />
        Sales_Batch,<br />
        Customer_Num,<br />
        Customer_Name,<br />
        Created_By,<br />
        Item_Number,<br />
        Item_Description,<br />
        Is_Dropship,<br />
        Quantity,<br />
        Notes<br />
FROM    dbo.tspvSalesDocument a<br />
        JOIN dbo.tspvSalesLineItem b ON a.Sales_Doc_Num = b.Sales_Doc_Num<br />
WHERE   b.Purchasing_Status = &#8216;needs purchase&#8217;<br />
ORDER BY Sales_Batch,<br />
        Sales_Doc_ID</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/318/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=318&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/08/20/sql-script-orders-needing-purchase/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL View&#8211;Sales Document Holds</title>
		<link>http://rldu.wordpress.com/2011/04/28/sql-viewsales-document-holds/</link>
		<comments>http://rldu.wordpress.com/2011/04/28/sql-viewsales-document-holds/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 18:23:13 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[Views]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Views]]></category>

		<guid isPermaLink="false">https://rldu.wordpress.com/2011/04/28/sql-viewsales-document-holds/</guid>
		<description><![CDATA[The following view shows all Sales Documents with active or inactive holds. This view is also a modification of the spvSalesDocumentHolds view from Salespad (www.salespad.net). You can name the view whatever you want by change the [tspvSalesDocumentHolds] below.&#160; Also the USE [TSP] tells the script to only execute on my database named TSP.&#160; You will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=306&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>The following view shows all Sales Documents with active or inactive holds.</strong></p>
<p>This view is also a modification of the spvSalesDocumentHolds view from Salespad (<a href="http://www.salespad.net/">www.salespad.net</a>).</p>
<p><strong>You can name the view whatever you want by change the [tspvSalesDocumentHolds] below.&#160; Also the USE [TSP] tells the script to only execute on my database named TSP.&#160; You will need to modify the [TSP] to be whatever your database name is.</strong></p>
<p>USE [TSP]   <br />GO    <br />/****** Object:&#160; View [dbo].[tspvSalesDocumentHold]&#160;&#160;&#160; Script Date: 04/28/2011 14:20:35 ******/    <br />SET ANSI_NULLS ON    <br />GO    <br />SET QUOTED_IDENTIFIER ON    <br />GO    <br />create view [dbo].[tspvSalesDocumentHold]    <br />as</p>
<p>select    <br />&#160;&#160;&#160; [Sales_Doc_Type]=CASE SOPTYPE when 1 then &#8216;QUOTE&#8217; when 2 then &#8216;ORDER&#8217; when 3 then &#8216;INVOICE&#8217; when 4 then &#8216;RETURN&#8217; when 5 then &#8216;BACKORDER&#8217; end,     <br />&#160;&#160;&#160; [Sales_Doc_Num]=SOPNUMBE,     <br />&#160;&#160;&#160; [Hold_Code]=SOP10104.PRCHLDID,     <br />&#160;&#160;&#160; [Is_Deleted]=cast(DELETE1 as bit),     <br />&#160;&#160;&#160; [User_ID]=USERID,     <br />&#160;&#160;&#160; [Last_Update_On]=cast(convert(char(11), HOLDDATE, 1) + convert(varchar, TIME1, 14) as smalldatetime),    <br />&#160;&#160;&#160; [Cant_Transfer]=cast(XFERPHOL as bit),     <br />&#160;&#160;&#160; [Cant_Post]=cast(POSTPHOL as bit),     <br />&#160;&#160;&#160; [Cant_Fulfill]=cast(FUFIPHOL as bit),     <br />&#160;&#160;&#160; [Cant_Print]=cast(PRINPHOL as bit)    <br />from SOP10104 (nolock) join SOP00100 as h (nolock) on h.PRCHLDID = SOP10104.PRCHLDID    </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/306/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=306&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/04/28/sql-viewsales-document-holds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Script &#8211; Standard Cost Less Than Valuation Cost</title>
		<link>http://rldu.wordpress.com/2011/04/22/sql-script-standard-cost-less-than-valuation-cost/</link>
		<comments>http://rldu.wordpress.com/2011/04/22/sql-script-standard-cost-less-than-valuation-cost/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 13:16:04 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[Inventory]]></category>
		<category><![CDATA[Inventory Valuations]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sql alerts]]></category>
		<category><![CDATA[SQL Scripts]]></category>

		<guid isPermaLink="false">http://rldu.wordpress.com/?p=295</guid>
		<description><![CDATA[We recently had a vendor decrease pricing (yes&#8230;you read that right&#8230;DECREASE!!!!). While this is wonderful to see, it has cause a little bit of a problem for us. We use a product call SmartConnect to import and update items and pricing. When our vendor sent us our updated price sheet, we imported the updates en [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=295&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We recently had a vendor decrease pricing (yes&#8230;you read that right&#8230;DECREASE!!!!). While this is wonderful to see, it has cause a little bit of a problem for us. We use a product call <a href="http://www.eonesolutions.com.au/Content.aspx?page=SmartConnect" target="_blank">SmartConnect</a> to import and update items and pricing. When our vendor sent us our updated price sheet, we imported the updates en masse, which caused our Standard Cost to decrease on many of the items. The problem with this is that we had products where their FIFO (FIFO is what we use&#8230;this would apply to LIFO as well) valuation was now higher than the Standard Cost. This means we are selling our product based on a cost that is actually less than we paid for it. This means lower margins or even losing money on the sell of the product.</p>
<p>For example:</p>
<p>We purchased 5 x widgets for $100.00. We have sold 3 x widgets for $125 based on a Standard Cost of $100. That is a 25% margin we just made on each widget. Now the price decrease comes in and our new Standard Cost is $90.00. We sell the next 2 widgets, based on a standard cost of $90 and 25% margin, for $120. Now if our actual costs were $90, then that would be a 25% margin as well, but remember we still have 2 x widgets in stock that we paid $100 for. Now our margin is only 20% ($100 cost and $120 sell = 20% margin).</p>
<p>The solution:    <br />I have written a script that will compare our Standard Cost to our inventory valuation table to see if we have purchased something for more than we have our Standard Cost setup. </p>
<p><em>***This script assumes you are using Standard Cost as your calculation for setting margin/markup on your item. If you are not, then let me know and I will show you how to change to Current Cost.***</em></p>
<p>This script uses the following views:</p>
<blockquote><p><font color="#444444"></font><a href="http://rldu.wordpress.com/2010/03/24/sql-view-item-master/" target="_blank">Item Master</a> (tspvItemMaster)</p>
<p><a href="http://rldu.wordpress.com/2010/03/29/sql-view-inventory-receipts/" target="_blank">Inventory Receipts</a> (tspvInventoryReceipts)</p>
</blockquote>
<p><strong>***SQL Script***</strong></p>
<p>SELECT&#160; Item_Class_Code,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; a.Item_Number,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [OnHand] = Qty_Received &#8211; Qty_Sold,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; b.Unit_Cost,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; a.Standard_Cost,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [CostDiff] = a.Standard_Cost &#8211; b.Unit_Cost     <br />FROM&#160;&#160;&#160; dbo.tspvItemMaster a     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; LEFT JOIN dbo.tspvInventoryReceipts b ON a.Item_Number = b.Item_Number     <br />WHERE&#160;&#160; Qty_Received &#8211; Qty_Sold &gt; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND ( a.Standard_Cost &#8211; b.Unit_Cost &lt; -0.02 )&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND Standard_Cost &lt;&gt; &#8217;0.00&#8242;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />ORDER BY (a.Standard_Cost-b.Unit_Cost) </p>
<p><strong>***Updated 4/22/2011***</strong></p>
<p>The above script will return the true FIFO/LIFO layer.&#160; So if you have 2 x widgets at a cost of $100 and 3 x widgets at a cost of $95 then you will see 2 results.&#160; The first row showing how 2 x widgets with a unit_cost of $100 and then a second row showing 3 x widgets with a unit_cost of $95.&#160; </p>
<p>The script below will give you the MAX FIFO/LIFO value found and only return 1 row for each item_number.&#160; So the results would just show the widget (no quantities) with a unit_cost of $100 (because $100 is more than $95).</p>
<p><strong>***SQL Script MAX***</strong></p>
<p>Select&#160; Item_Class_Code,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Item_Number,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Item_Description,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Standard_Cost,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Unit_Cost]=( Select&#160;&#160;&#160; MAX(b.Unit_Cost) AS &#8216;unit_cost&#8217;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; from&#160;&#160;&#160;&#160;&#160; dbo.tspvInventoryReceipts b     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Where&#160;&#160;&#160;&#160; b.Item_Number = a.Item_Number     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND ( Qty_Received &#8211; Qty_Sold &gt; 0 )     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; group by&#160; b.Item_Number     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ),     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Cost_Diff]=a.Standard_Cost-( Select&#160;&#160;&#160; MAX(b.Unit_Cost) AS &#8216;unit_cost&#8217;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; from&#160;&#160;&#160;&#160;&#160; dbo.tspvInventoryReceipts b     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Where&#160;&#160;&#160;&#160; b.Item_Number = a.Item_Number     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND ( Qty_Received &#8211; Qty_Sold &gt; 0 )     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; group by&#160; b.Item_Number     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; )     <br />from&#160;&#160;&#160; dbo.tspvItemMaster a     <br />WHERE&#160;&#160; a.Item_Number NOT LIKE &#8216;*%&#8217;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND Item_Class_Code &lt;&gt; &#8216;used equip&#8217;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND ( Select&#160;&#160;&#160; MAX(b.Unit_Cost) AS &#8216;unit_cost&#8217;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; from&#160;&#160;&#160;&#160;&#160; dbo.tspvInventoryReceipts b     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Where&#160;&#160;&#160;&#160; b.Item_Number = a.Item_Number     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND ( Qty_Received &#8211; Qty_Sold &gt; 0 )     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; group by&#160; b.Item_Number     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ) IS NOT NULL     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND a.Standard_Cost &#8211; ( Select&#160; MAX(b.Unit_Cost) AS &#8216;unit_cost&#8217;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; from&#160;&#160;&#160; dbo.tspvInventoryReceipts b     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Where&#160;&#160; b.Item_Number = a.Item_Number     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AND ( Qty_Received &#8211; Qty_Sold &gt; 0 )     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; group by b.Item_Number     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ) &lt; -0.02     <br />ORDER BY Item_Class_Code, a.Item_Number</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/295/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=295&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2011/04/22/sql-script-standard-cost-less-than-valuation-cost/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
		<item>
		<title>What I Have Been Up To Lately</title>
		<link>http://rldu.wordpress.com/2010/12/20/what-i-have-been-up-to-lately/</link>
		<comments>http://rldu.wordpress.com/2010/12/20/what-i-have-been-up-to-lately/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 19:37:47 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[About Me]]></category>

		<guid isPermaLink="false">http://rldu.wordpress.com/?p=292</guid>
		<description><![CDATA[Folks&#8230;I just wanted to update you on the status of the RLDU blog. It has obviously been pretty stagnant over the past couple of months. I recently received a big promotion at work and I am know the &#8220;Director of Operations&#8221; (big title I know&#8230;). This has taken up a very large amount of time [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=292&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> Folks&#8230;I just wanted to update you on the status of the RLDU blog.  It has obviously been pretty stagnant over the past couple of months.  I recently received a big promotion at work and I am know the &#8220;Director of Operations&#8221; (big title I know&#8230;).  This has taken up a very large amount of time at work as well as at home (where I usually get to write these posts).  I will continue to maintain this blog as I have time.  I am still very much involved in the day to day operations of our GP environment and will continue to post *hopefully* helpful and useful information.  I will never be the kind of blogger who posts for the sake of posts counts (even though I do admit I hate seeing months go by with no posts).  I appreciate the understanding and continued support.</p>
<p>Ron</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rldu.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rldu.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rldu.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rldu.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rldu.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rldu.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rldu.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rldu.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rldu.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rldu.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rldu.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rldu.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rldu.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rldu.wordpress.com/292/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rldu.wordpress.com&amp;blog=4908976&amp;post=292&amp;subd=rldu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rldu.wordpress.com/2010/12/20/what-i-have-been-up-to-lately/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/af3973a7f6d35ef5307e758479c2a1ff?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">r270ba</media:title>
		</media:content>
	</item>
	</channel>
</rss>
