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 |
|
JJins
Yak Posting Veteran
81 Posts |
Posted - 2010-11-19 : 13:25:43
|
| Can someone help me understand this query, specifically I want to change the ending where statement to multiple fields that make 10000,10001 and 10002 unique to that specific programid. but still not sure what this statement is doing.Thanks again!GGINSERT INTO [Rating_2].[dbo].[RateData] ([ApplicationID] ,[ProgramID] ,[CoverageID] ,[LimitCoverageID] ,[LimitMin] ,[LimitMax] ,[RateCalcCoverageID] ,[Rate] ,[CalcType] ,[RateType] ,[EffectiveDate] ,[ExpirationDate] ,[PCMin] ,[PCMax] ,[Territory])(select 3, programid, 1 covid, 1 limitcovid, limitmin, limitmax, 1, m1 , 'F', 'B', '11/1/2009', '12/31/2999', 1, 6, 'A'from ratesa rinner join programs p on 1=1where p.programid in (10000,10001,10002)) |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
JJins
Yak Posting Veteran
81 Posts |
Posted - 2010-11-19 : 15:31:22
|
| Sorry about the yellow!ha I thought it was going to highlight. Below is the table I am trying to insert value into table ratedata.I want to insert the rate from the table below when the variables to the rate match all the variables in associated with the programid. Here is the table....and then below that are various fields in tables. thanks for the help. Territory A; Owner Coverage PC 1 - 6 PC 7 - 8 PC 9 - 10 min max Frame Masonry Frame Masonry Frame Masonrymin Max f1 m1 f6 m6 f9 m91000 1000 1181 1064 1181 1064 1181 10641001 2000 1200 1081 1200 1081 1200 10812001 3000 1218 1097 1218 1097 1218 10973001 4000 1235 1113 1235 1113 1235 11134001 5000 1254 1130 1254 1130 1254 11305001 6000 1272 1146 1272 1146 1272 11466001 7000 1291 1163 1291 1163 1291 11637001 8000 1309 1179 1309 1179 1309 11798001 9000 1328 1196 1328 1196 1328 11969001 10000 1345 1212 1345 1212 1345 1212fields in tableRateID ApplicationID ProgramID CoverageID LimitCoverageID LimitMin LimitMax RateCalcCoverageID Rate CalcType RateType EffectiveDate ExpirationDate PCMin PCMax Territory State OccupancyTypeID PolicyType ConstructionType policyterm DCminLet me know what else info you need? I can also email you if that would help. I really could use the help.GG |
 |
|
|
JJins
Yak Posting Veteran
81 Posts |
Posted - 2010-11-19 : 15:37:04
|
| first row limitmin, second row limitmax, thirdrow f1 fourth m1 fifth f6 sixth m6 seventh f9, eighth m9above that is PC 1-6 is for f1 and m1 PC 6-8 F6 note above should be pc 6-8 not 7-8.pc 9-10 f9 |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|
|