Click here to Skip to main content
15,913,289 members
Home / Discussions / Database
   

Database

 
GeneralRe: Need Stored Procedure help Pin
pmarfleet11-Jan-08 22:30
pmarfleet11-Jan-08 22:30 
GeneralRe: Need Stored Procedure help Pin
Paul Conrad19-Jan-08 7:13
professionalPaul Conrad19-Jan-08 7:13 
GeneralQuestion about DBCC SHRINKDATABASE() Pin
Xmen Real 11-Jan-08 15:22
professional Xmen Real 11-Jan-08 15:22 
Generaldatabase connection using access database Pin
mon***z11-Jan-08 0:33
mon***z11-Jan-08 0:33 
GeneralRe: database connection using access database Pin
pmarfleet11-Jan-08 1:49
pmarfleet11-Jan-08 1:49 
GeneralRe: database connection using access database Pin
Pete O'Hanlon11-Jan-08 2:58
mvePete O'Hanlon11-Jan-08 2:58 
GeneralRe: database connection using access database Pin
pmarfleet11-Jan-08 3:03
pmarfleet11-Jan-08 3:03 
GeneralMSSQL: removing semi-duplicate entries Pin
ruanr10-Jan-08 22:35
ruanr10-Jan-08 22:35 
Hi,

I have a table (call it Part) listing our products and their prices. Prices change every once in a while and my boss made a new entry for each product every time its price changed. A simplified illustration:
<br />
ID     Name     PriceEffectiveDate      Price<br />
----   ----   --------------------      -----<br />
1      Shoe    1-1-2006                 $1<br />
2      Glove   1-1-2006                 $2<br />
...<br />
41     Shoe    1-1-2007                 $2<br />
<br />
(etc)<br />

(I should mention there is no priceEffectivedate column, he used a col that was intended for something else!)

Obviously this is horrible design, so I created a second table (PartPrice) with columns partID,Price,and EffectiveDate.

Now I need to remove the later entries for each product, but keep the original ones, and make the corresponding entries in the PartPrice table... I'm not an experienced SQL developer, anyone have any ideas? There are two things to make the problem simpler: Every part has a unique name, and the amount of parts have stayed constant, so each part has its entries a constant amount apart (i.e. Shoe will have ID's 1, 41, 81; glove will have 2,42,82 etc)

Any hints/tips/ideas?
GeneralRe: MSSQL: removing semi-duplicate entries Pin
Michael Potter11-Jan-08 11:32
Michael Potter11-Jan-08 11:32 
GeneralLinq to SQL - Writing a generic "GetObjectFromId" method Pin
Dominic Pettifer10-Jan-08 5:20
Dominic Pettifer10-Jan-08 5:20 
GeneralRe: Linq to SQL - Writing a generic "GetObjectFromId" method Pin
Mark Churchill10-Jan-08 13:15
Mark Churchill10-Jan-08 13:15 
GeneralRe: Linq to SQL - Writing a generic "GetObjectFromId" method Pin
Pete O'Hanlon10-Jan-08 21:43
mvePete O'Hanlon10-Jan-08 21:43 
GeneralRe: Linq to SQL - Writing a generic "GetObjectFromId" method Pin
Mark Churchill12-Jan-08 4:30
Mark Churchill12-Jan-08 4:30 
GeneralConditional Index Usage Pin
gnjunge10-Jan-08 3:40
gnjunge10-Jan-08 3:40 
GeneralRe: Conditional Index Usage Pin
Dave-B10-Jan-08 5:18
Dave-B10-Jan-08 5:18 
GeneralRe: Conditional Index Usage Pin
gnjunge10-Jan-08 5:40
gnjunge10-Jan-08 5:40 
GeneralRe: Conditional Index Usage Pin
GuyThiebaut10-Jan-08 5:48
professionalGuyThiebaut10-Jan-08 5:48 
GeneralRe: Conditional Index Usage Pin
gnjunge10-Jan-08 6:07
gnjunge10-Jan-08 6:07 
AnswerRe: Conditional Index Usage Pin
GuyThiebaut10-Jan-08 7:46
professionalGuyThiebaut10-Jan-08 7:46 
GeneralRe: Conditional Index Usage Pin
gnjunge10-Jan-08 19:14
gnjunge10-Jan-08 19:14 
GeneralRe: Conditional Index Usage Pin
Dave-B10-Jan-08 21:53
Dave-B10-Jan-08 21:53 
GeneralRe: Conditional Index Usage Pin
gnjunge10-Jan-08 22:59
gnjunge10-Jan-08 22:59 
GeneralRe: Conditional Index Usage Pin
gnjunge12-Jan-08 23:34
gnjunge12-Jan-08 23:34 
GeneralRe: Conditional Index Usage Pin
GuyThiebaut10-Jan-08 22:17
professionalGuyThiebaut10-Jan-08 22:17 
GeneralSQL database create Pin
topcatalpha9-Jan-08 23:34
topcatalpha9-Jan-08 23:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.