﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / T-SQL (SS2K8)  / Inventory Report / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 03:36:23 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Inventory Report</title><link>http://www.sqlservercentral.com/Forums/Topic1379169-392-1.aspx</link><description>Sir,I would be glad to help you out but for accurate result please read below article and repost according to Post Etiquettethat way more people would be interested to provide solution including myselfhttp://www.sqlservercentral.com/articles/Best+Practices/61537/Thanks and have a great day ahead</description><pubDate>Wed, 31 Oct 2012 09:26:02 GMT</pubDate><dc:creator>T_Dot_Geek</dc:creator></item><item><title>Inventory Report</title><link>http://www.sqlservercentral.com/Forums/Topic1379169-392-1.aspx</link><description>My database with the following table:ITDetail Table[IMG]http://i.imgur.com/WcwRI.jpg[/IMG]InvTrans Table[IMG]http://i.imgur.com/hPnlz.jpg[/IMG]Currency Table[IMG]http://i.imgur.com/YUNxC.jpg[/IMG]Database Relationship[IMG]http://i.imgur.com/CTCdo.jpg[/IMG]I need to build a report with the time parameter (use the procedure) with the following requirements:[IMG]http://i.imgur.com/PwVYX.jpg[/IMG]1. MaterialID, Art, Color, Width is taken from the table ITDetail2. Period: 1 to 90 (days) - Time: DateCreateda. Quantity: with TypeID is 'X' is the OUT quantity (X001, X002, ...), with TypeID is 'N' is the INT quantity (N021, N014, ...)A: Total quantity IN of 1 to 91 (days)B: Total quantity OUT of 1 to 91 (days)C: The quantity need to findIf: A≥B then C = A – B; If A&amp;lt;B then C = 0b. Price:USD: Price = Quantity * ExchangeRate (USD in InvTrans table)VND: Price = Quantity * 13. Period: After 271 daysX: Time parameterA: Total quantity IN of X to 271 (days)B: Total quantity OUT of X to 271 (days)C: The quantity need to findIf: A≥B then C = A – B; If A&amp;lt;B then C = 0Appreciate your help! Thanks!</description><pubDate>Wed, 31 Oct 2012 01:05:03 GMT</pubDate><dc:creator>manhthao.dn</dc:creator></item></channel></rss>