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 |
|
http
Starting Member
3 Posts |
Posted - 2006-08-29 : 05:03:12
|
| Hi all!I'm beginning in SQL Server. I got a problem :I need to design a database manage foreign currency and everyday it must be update. I design a tables :tbl_Currency includes : iCurrencyId, iOrder, cCurrrencyName, cUnit, mBuyingCash, mBuyingTranfers, mSelling, dDayUpdate.But now people want to view this rate by day. How can I do this? Create a new table to save old value or modify the current table?Thank |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-08-29 : 05:07:34
|
Add a datetime column to the table. Create a view that only select the latest record for each iCurrencyId KH |
 |
|
|
http
Starting Member
3 Posts |
Posted - 2006-08-29 : 05:45:24
|
| Thank for reply, but i'm not understand.People maybe want to view rate in last year, so I must save old record when I update a new rate.Can you exlaint more. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-08-29 : 06:12:31
|
can you post your table structure with some sample data ?I will try to explain with the query KH |
 |
|
|
http
Starting Member
3 Posts |
Posted - 2006-08-29 : 10:10:48
|
| tbl_Currency includes : iCurrencyId, iOrder, cCurrrencyName, cUnit, mBuyingCash, mBuyingTranfers, mSelling, dDayUpdate.When I update a new value for mBuyingCash or mBuyingTranfers or mSelling I want save the old value. So customers can view it again. Because everyday the value of mBuyingCash, mBuyingTranfers, mSelling always change. |
 |
|
|
|
|
|
|
|