Click here to Skip to main content
13,046,184 members (59,814 online)
   

Database

 
QuestionI want to ask query related to mysql Pin
manisharathore5-Jan-13 7:32
membermanisharathore5-Jan-13 7:32 
AnswerRe: I want to ask query related to mysql Pin
Mycroft Holmes5-Jan-13 11:03
memberMycroft Holmes5-Jan-13 11:03 
Questionproblem in ado.net with access 2010 Pin
Achilles843-Jan-13 23:20
memberAchilles843-Jan-13 23:20 
AnswerRe: problem in ado.net with access 2010 Pin
Mycroft Holmes4-Jan-13 13:55
memberMycroft Holmes4-Jan-13 13:55 
Questionhow to cast real data type in sql server 2005 Pin
Auf Klarung2-Jan-13 22:55
memberAuf Klarung2-Jan-13 22:55 
QuestionRe: how to cast real data type in sql server 2005 Pin
Eddy Vluggen4-Jan-13 22:52
memberEddy Vluggen4-Jan-13 22:52 
QuestionSql server like clause Pin
rubonkumar28-Dec-12 4:44
memberrubonkumar28-Dec-12 4:44 
AnswerRe: Sql server like clause Pin
Richard MacCutchan28-Dec-12 6:05
mvpRichard MacCutchan28-Dec-12 6:05 
AnswerRe: Sql server like clause Pin
PIEBALDconsult28-Dec-12 6:38
memberPIEBALDconsult28-Dec-12 6:38 
GeneralRe: Sql server like clause Pin
Mike Meinz28-Dec-12 6:49
memberMike Meinz28-Dec-12 6:49 
GeneralRe: Sql server like clause Pin
rubonkumar28-Dec-12 19:08
memberrubonkumar28-Dec-12 19:08 
AnswerRe: Sql server like clause Pin
rajarao3044-Jan-13 0:50
memberrajarao3044-Jan-13 0:50 
QuestionDatabase design question Pin
DavidCrow27-Dec-12 15:22
memberDavidCrow27-Dec-12 15:22 
AnswerRe: Database design question Pin
PIEBALDconsult27-Dec-12 15:52
memberPIEBALDconsult27-Dec-12 15:52 
Instead of having one price record per item, have many records with history so you can see what the price was when the order was placed.

Something like:
Item: ItemId,Name,Description,Supplier,etc.

1,Widget,A standard widget,Widget Co,...

ItemPrice: PriceId,ItemId,FromDate,ToDate,Price

1,1,2012-01-01,2012-07-01,1.00<br />
2,1,2012-07-01,null,1.50


When a new price is added, the FromDate of the new record and the ToDate of the previous price are set as Now.
You find the current price by WHERE ToDate IS NULL
To find a price for an order you can use WHERE orderdate BETWEEN FromDate and ISNULL(ToDate,Now)
You may add NextPrice and PreviousPrice fields if you need to do a lot of lookups.

(Specific syntax depends on the particular database in use.)
AnswerRe: Database design question Pin
jschell28-Dec-12 10:16
memberjschell28-Dec-12 10:16 
GeneralRe: Database design question Pin
PIEBALDconsult28-Dec-12 14:42
memberPIEBALDconsult28-Dec-12 14:42 
GeneralRe: Database design question Pin
jschell30-Dec-12 8:28
memberjschell30-Dec-12 8:28 
AnswerRe: Database design question Pin
Mycroft Holmes28-Dec-12 11:05
memberMycroft Holmes28-Dec-12 11:05 
QuestionImporting of Huge fixed width text file in sql server table Pin
ibrahim sharief27-Dec-12 9:24
memberibrahim sharief27-Dec-12 9:24 
AnswerRe: Importing of Huge fixed width text file in sql server table Pin
PIEBALDconsult27-Dec-12 14:08
memberPIEBALDconsult27-Dec-12 14:08 
AnswerRe: Importing of Huge fixed width text file in sql server table Pin
Deepak Kr130-Dec-12 20:29
memberDeepak Kr130-Dec-12 20:29 
AnswerRe: Importing of Huge fixed width text file in sql server table Pin
jschell31-Dec-12 9:14
memberjschell31-Dec-12 9:14 
Questionshow Sum(Balance) as ob on Rows Header and add next rows balance in ob Pin
hadeed147227-Dec-12 6:52
memberhadeed147227-Dec-12 6:52 
AnswerRe: show Sum(Balance) as ob on Rows Header and add next rows balance in ob Pin
djj5527-Dec-12 7:53
memberdjj5527-Dec-12 7:53 
GeneralRe: show Sum(Balance) as ob on Rows Header and add next rows balance in ob Pin
hadeed147227-Dec-12 8:03
memberhadeed147227-Dec-12 8:03 
QuestionSQL BulkCopy using IDataReader - how can you cast the fields? Pin
Allan Watkins26-Dec-12 19:12
memberAllan Watkins26-Dec-12 19:12 
AnswerRe: SQL BulkCopy using IDataReader - how can you cast the fields? Pin
Mycroft Holmes26-Dec-12 20:32
memberMycroft Holmes26-Dec-12 20:32 
GeneralRe: SQL BulkCopy using IDataReader - how can you cast the fields? Pin
AllanW1111127-Dec-12 6:02
memberAllanW1111127-Dec-12 6:02 
AnswerRe: SQL BulkCopy using IDataReader - how can you cast the fields? Pin
PIEBALDconsult27-Dec-12 8:48
memberPIEBALDconsult27-Dec-12 8:48 
QuestionSubquery returns more than 1 row Pin
Jassim Rahma24-Dec-12 1:02
memberJassim Rahma24-Dec-12 1:02 
AnswerRe: Subquery returns more than 1 row Pin
Eddy Vluggen24-Dec-12 1:29
memberEddy Vluggen24-Dec-12 1:29 
AnswerRe: Subquery returns more than 1 row Pin
MaulikDusara24-Dec-12 21:44
memberMaulikDusara24-Dec-12 21:44 
GeneralRe: Subquery returns more than 1 row Pin
Eddy Vluggen25-Dec-12 2:41
memberEddy Vluggen25-Dec-12 2:41 
GeneralRe: Subquery returns more than 1 row Pin
Mycroft Holmes26-Dec-12 11:17
memberMycroft Holmes26-Dec-12 11:17 
GeneralRe: Subquery returns more than 1 row Pin
MaulikDusara26-Dec-12 18:45
memberMaulikDusara26-Dec-12 18:45 
GeneralRe: Subquery returns more than 1 row Pin
Eddy Vluggen27-Dec-12 4:24
memberEddy Vluggen27-Dec-12 4:24 
QuestionOn the Naming of Columns for Lookup tables. Pin
Brady Kelly17-Dec-12 22:44
memberBrady Kelly17-Dec-12 22:44 
AnswerRe: On the Naming of Columns for Lookup tables. Pin
Mycroft Holmes17-Dec-12 23:19
memberMycroft Holmes17-Dec-12 23:19 
GeneralRe: On the Naming of Columns for Lookup tables. Pin
Brady Kelly17-Dec-12 23:26
memberBrady Kelly17-Dec-12 23:26 
GeneralRe: On the Naming of Columns for Lookup tables. Pin
Mycroft Holmes18-Dec-12 1:11
memberMycroft Holmes18-Dec-12 1:11 
GeneralRe: On the Naming of Columns for Lookup tables. Pin
Brady Kelly18-Dec-12 1:15
memberBrady Kelly18-Dec-12 1:15 
AnswerRe: On the Naming of Columns for Lookup tables. Pin
PIEBALDconsult18-Dec-12 4:05
memberPIEBALDconsult18-Dec-12 4:05 
GeneralRe: On the Naming of Columns for Lookup tables. Pin
Brady Kelly18-Dec-12 4:12
memberBrady Kelly18-Dec-12 4:12 
GeneralRe: On the Naming of Columns for Lookup tables. Pin
PIEBALDconsult18-Dec-12 4:46
memberPIEBALDconsult18-Dec-12 4:46 
GeneralRe: On the Naming of Columns for Lookup tables. Pin
Brady Kelly18-Dec-12 5:34
memberBrady Kelly18-Dec-12 5:34 
QuestionOn Strategies to Spell Check the Structure of a Database. Pin
Brady Kelly14-Dec-12 3:02
memberBrady Kelly14-Dec-12 3:02 
JokeRe: On Strategies to Spell Check the Structure of a Database. Pin
Chris Meech14-Dec-12 4:31
memberChris Meech14-Dec-12 4:31 
AnswerRe: On Strategies to Spell Check the Structure of a Database. Pin
Simon_Whale14-Dec-12 4:52
memberSimon_Whale14-Dec-12 4:52 
AnswerRe: On Strategies to Spell Check the Structure of a Database. Pin
Mycroft Holmes14-Dec-12 13:12
memberMycroft Holmes14-Dec-12 13:12 
GeneralRe: On Strategies to Spell Check the Structure of a Database. Pin
Brady Kelly14-Dec-12 16:36
memberBrady Kelly14-Dec-12 16:36 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 21 Jul 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid