<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — help with a SQL statement]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=811</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=811&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in help with a SQL statement.]]></description>
		<lastBuildDate>Fri, 04 Dec 2009 18:49:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: help with a SQL statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=4050#p4050</link>
			<description><![CDATA[<p>Ok forget what I just said about location.. I just not getting result I need. I need &quot;codes.stock_id, codes.description, stock.reorder_qty&quot; and more later.</p><p>Where &quot;stock.reorder_level &lt; (Re-Order Level)&quot; for Location X.</p><p>Tom, I guess it is a date issue, what I need to add is Quantity On Hand, for today, stock.reorder_level &lt; moves.qty; needs to be for todays date, for that stock_id.&nbsp; Something like the function get_qoh_on_date.</p><p>Sorry I don&#039;t know much about this...&nbsp; what do ya think?</p><p>AM</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Fri, 04 Dec 2009 18:49:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=4050#p4050</guid>
		</item>
		<item>
			<title><![CDATA[Re: help with a SQL statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=4048#p4048</link>
			<description><![CDATA[<p>Hi Alvin,</p><p>&nbsp; I&#039;m not totally sure I follow.&nbsp; Could you clarify your needs?</p><p>Tom</p>]]></description>
			<author><![CDATA[null@example.com (tomhallman)]]></author>
			<pubDate>Fri, 04 Dec 2009 18:08:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=4048#p4048</guid>
		</item>
		<item>
			<title><![CDATA[Re: help with a SQL statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=4047#p4047</link>
			<description><![CDATA[<p>Hello Tom, Thanks for your help!!</p><p>I need to add, where stock.reorder_level &gt;= moves.qty; (location,qty) I need to sort be Location Qty, not all location&#039;s qty&#039;s,&nbsp; did I say that right?</p><p>Thanks for all the help from the SQL Dept.</p><p>Alvin</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Fri, 04 Dec 2009 18:01:48 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=4047#p4047</guid>
		</item>
		<item>
			<title><![CDATA[Re: help with a SQL statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=3377#p3377</link>
			<description><![CDATA[<p>Hi Alvin,</p><p>&nbsp; I&#039;m a little rusty on my joins and I don&#039;t particularly use the Items and Inventory module, but is this something like what you&#039;re looking for?&nbsp; (I&#039;m assuming those Xs are actually referring to different values, that is, X and Y.)</p><p>select distinct codes.stock_id, codes.description<br />&nbsp; from 0_item_codes as codes <br />&nbsp; &nbsp; &nbsp; &nbsp;left join 0_loc_stock as stock on (codes.stock_id = stock.stock_id)<br />&nbsp; &nbsp; &nbsp; &nbsp;left join 0_purch_data as purch on (stock.stock_id = purch.stock_id)<br />&nbsp; &nbsp; &nbsp; &nbsp;left join 0_stock_moves as moves on (purch.stock_id = moves.stock_id)<br /> where stock.loc_code LIKE &#039;X&#039; and<br />&nbsp; &nbsp; &nbsp; &nbsp;purch.supplier_id = Y and<br />&nbsp; &nbsp; &nbsp; &nbsp;stock.reorder_level &gt;= moves.qty;</p><p>~Tom</p>]]></description>
			<author><![CDATA[null@example.com (tomhallman)]]></author>
			<pubDate>Tue, 01 Sep 2009 13:01:36 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=3377#p3377</guid>
		</item>
		<item>
			<title><![CDATA[help with a SQL statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=3361#p3361</link>
			<description><![CDATA[<p>I would like some help with a SQL statement.</p><p>I know that the PO system is being worked on and will get better with time, but if I could just do a query on the database for now it would be a big help.</p><p>I would like to display columns 0_item_codes.stock_id, 0_item_codes.description,&nbsp; and maybe more later.</p><p>Where<br />0_loc_stock.loc_code =X and<br />0_purch_data.supplier_id =X and<br />0_loc_stock.reorder_level is =&gt; 0_stock_moves.qty</p><p>Something like that...</p><p>If anyone out there can help with this or has put a query together for PO&#039;s it would be a great help?</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Fri, 28 Aug 2009 23:35:38 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=3361#p3361</guid>
		</item>
	</channel>
</rss>
