Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
manhthaodn
Starting Member
3 Posts |
Posted - 2012-10-31 : 03:34:30
|
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: MaterialID, Art, Color, Width is taken from the table ITDetailPeriod: 1 to 90 (days)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 findIf: A=B then C = A – B; If A<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<B then C = 0Appreciate your help! Thanks! |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-10-31 : 04:50:03
|
Can u post sample data in the form of text?--Chandu |
 |
|
manhthaodn
Starting Member
3 Posts |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
|
manhthaodn
Starting Member
3 Posts |
Posted - 2012-10-31 : 09:24:22
|
Hi bandi!How to send you the database? |
 |
|
|
|
|