Click here to Skip to main content
15,911,715 members
Home / Discussions / Database
   

Database

 
AnswerRe: i need help plz Pin
Chris Meech5-Apr-11 6:44
Chris Meech5-Apr-11 6:44 
AnswerRe: i need help plz Pin
Om Prakash Pant5-Apr-11 20:31
Om Prakash Pant5-Apr-11 20:31 
QuestionRecords with default values Pin
CodingLover5-Apr-11 0:36
CodingLover5-Apr-11 0:36 
AnswerRe: Records with default values Pin
Wendelius5-Apr-11 2:36
mentorWendelius5-Apr-11 2:36 
QuestionRe: Records with default values Pin
CodingLover5-Apr-11 17:48
CodingLover5-Apr-11 17:48 
AnswerRe: Records with default values Pin
Wendelius5-Apr-11 17:59
mentorWendelius5-Apr-11 17:59 
NewsRe: Records with default values Pin
CodingLover5-Apr-11 18:40
CodingLover5-Apr-11 18:40 
AnswerRe: Records with default values Pin
Wendelius5-Apr-11 18:46
mentorWendelius5-Apr-11 18:46 
CodingLover wrote:
The requirement is, for few sales rep I want to find the sales in a date range

This is a different thing. What I'm saying is that consider populating the table with long enough date range. And when you use the table take only the relevant portion of dates from it using proper WHERE condition. For example:
SELECT ...
FROM DateTable dt LEFT OUTER JOIN MyTable mt
     ON dt.DateColumn =  mt.DateColumn
WHERE dt.DateColumn BETWEEN @startdate AND @enddate

This way you can reuse the same data every time you fetch data for a new date range without having to re-create the dates.
The need to optimize rises from a bad design.My articles[^]

GeneralRe: Records with default values Pin
CodingLover5-Apr-11 18:55
CodingLover5-Apr-11 18:55 
GeneralRe: Records with default values Pin
Wendelius5-Apr-11 19:04
mentorWendelius5-Apr-11 19:04 
GeneralRe: Records with default values Pin
CodingLover5-Apr-11 22:14
CodingLover5-Apr-11 22:14 
AnswerRe: Records with default values Pin
Shameel5-Apr-11 5:22
professionalShameel5-Apr-11 5:22 
GeneralRe: Records with default values Pin
CodingLover5-Apr-11 17:53
CodingLover5-Apr-11 17:53 
AnswerRe: Records with default values Pin
jschell6-Apr-11 8:30
jschell6-Apr-11 8:30 
AnswerRe: Records with default values Pin
SilimSayo4-May-11 10:30
SilimSayo4-May-11 10:30 
QuestionRealtime Backups Pin
Lasanthapw4-Apr-11 20:14
Lasanthapw4-Apr-11 20:14 
AnswerRe: Realtime Backups Pin
Wendelius4-Apr-11 20:50
mentorWendelius4-Apr-11 20:50 
AnswerRe: Realtime Backups Pin
Mycroft Holmes4-Apr-11 22:21
professionalMycroft Holmes4-Apr-11 22:21 
GeneralRe: Realtime Backups Pin
Wendelius5-Apr-11 6:03
mentorWendelius5-Apr-11 6:03 
QuestionSchema ideas Pin
Super Lloyd4-Apr-11 17:58
Super Lloyd4-Apr-11 17:58 
AnswerRe: Schema ideas Pin
Wendelius4-Apr-11 18:50
mentorWendelius4-Apr-11 18:50 
GeneralRe: Schema ideas Pin
Super Lloyd4-Apr-11 18:56
Super Lloyd4-Apr-11 18:56 
GeneralRe: Schema ideas Pin
Wendelius4-Apr-11 19:15
mentorWendelius4-Apr-11 19:15 
QuestionA question about design Relational Model Pin
Duc Huy Nguyen2-Apr-11 22:31
Duc Huy Nguyen2-Apr-11 22:31 
AnswerRe: A question about design Relational Model Pin
Wendelius2-Apr-11 22:41
mentorWendelius2-Apr-11 22:41 

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.