Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Inventory Report Expand / Collapse
Author
Message
Posted Wednesday, October 31, 2012 1:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, December 02, 2012 8:02 PM
Points: 2, Visits: 27
My database with the following table:
ITDetail Table

InvTrans Table

Currency Table

Database Relationship

I need to build a report with the time parameter (use the procedure) with the following requirements:

1. MaterialID, Art, Color, Width is taken from the table ITDetail
2. Period: 1 to 90 (days) - Time: DateCreated
a. 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 find

If: A≥B then C = A – B; If A<B then C = 0

b. Price:

USD: Price = Quantity * ExchangeRate (USD in InvTrans table)
VND: Price = Quantity * 1
3. Period: After 271 days

X: Time parameter
A: Total quantity IN of X to 271 (days)
B: Total quantity OUT of X to 271 (days)
C: The quantity need to find

If: A≥B then C = A – B; If A<B then C = 0

Appreciate your help! Thanks!
Post #1379169
Posted Wednesday, October 31, 2012 9:26 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, November 08, 2012 9:15 AM
Points: 54, Visits: 82
Sir,
I would be glad to help you out but for accurate result please read below article and repost according to Post Etiquette
that way more people would be interested to provide solution including myself

http://www.sqlservercentral.com/articles/Best+Practices/61537/

Thanks and have a great day ahead



Post #1379385
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse