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 |
|
roxcy
Yak Posting Veteran
58 Posts |
Posted - 2006-08-31 : 11:23:04
|
| Hi, I have One Master Table & one ChildTable. Product & ProductRate.Product Contains ProductId ProductType ProductName.Values are 001,Monitor,LCDMONITOR 002,TV, LCDTV Similarly Product Rate Consists ProductId,ProductType,Price& Period.Its values are 001,LCDMonitor,10000,1 year. 002,TV,12000,2 year. 003,LCDMONITOR,15000,2 year.I am using a Form where in I have Period dropdownlist which has values 1 year,2 year..And one label Price .Now what i want is to display the price according to the year defined in child table.If the user selects 1 year and the product is LCDMONITOR THEN IT SHOULD display price as 10000.if 2 year the price should be 15000.Can anyone explain with stored Procedure the method to do this? Any help would be appreciated? Thanks... |
|
|
jco510811
Starting Member
9 Posts |
Posted - 2006-08-31 : 11:41:16
|
| Hi Roxy, If i have picked you up correctly all you have to do is create a SP with 2 parameters Period and ProductType. From the front end pass the two values back to the SP.Sorry if i have picked you up wrong. |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-08-31 : 13:26:26
|
Make sure you use the handles, and always bend at the knees. For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|
|
|