Click here to Skip to main content
15,915,160 members
Home / Discussions / Database
   

Database

 
QuestionQuery Regrding SQLDMO Foreign key column name Pin
ruparanju3-Dec-06 17:37
ruparanju3-Dec-06 17:37 
Questionquery's problem with periode Pin
bayangan13-Dec-06 11:22
bayangan13-Dec-06 11:22 
AnswerRe: query's problem with periode Pin
mr_lasseter3-Dec-06 11:51
mr_lasseter3-Dec-06 11:51 
GeneralRe: query's problem with periode Pin
bayangan13-Dec-06 12:14
bayangan13-Dec-06 12:14 
GeneralRe: query's problem with periode Pin
mr_lasseter3-Dec-06 12:59
mr_lasseter3-Dec-06 12:59 
GeneralRe: query's problem with periode Pin
bayangan13-Dec-06 13:23
bayangan13-Dec-06 13:23 
GeneralRe: query's problem with periode Pin
mr_lasseter4-Dec-06 2:46
mr_lasseter4-Dec-06 2:46 
GeneralRe: query's problem with periode [modified] Pin
bayangan14-Dec-06 13:55
bayangan14-Dec-06 13:55 
This is a bank's application where for each change value, i need to store it's period, calculate tenor (max date - min date) and then times it with pre-stored fee to get amount to charge. Bank charge the customer based on change value, that's why the 100 must not be grouped, it has to be split

Table's below will be included as part of customer's invoice for Nov 2006
Stock        Period                    Amount   Tenor Fee (%) CCY Charge
  Stock001    1 Nov 2006 - 23 Nov 2006 100.000     22    0.03 USD     30
             23 Nov 2006 - 25 Nov 2006 200.000      2    0.03 USD     60
             25 Nov 2006 - 30 Nov 2006 100.000      5    0.03 USD     30
                                              SubTotal:     USD    120


I just wonder whether this query with period could be done with only 1 select statement. Is it possible or not using a bit complex group by statement.


-- modified at 20:04 Monday 4th December, 2006
GeneralRe: query's problem with periode Pin
mr_lasseter4-Dec-06 16:31
mr_lasseter4-Dec-06 16:31 
GeneralRe: query's problem with periode Pin
bayangan14-Dec-06 23:30
bayangan14-Dec-06 23:30 
GeneralRe: query's problem with periode Pin
Colin Angus Mackay4-Dec-06 23:47
Colin Angus Mackay4-Dec-06 23:47 
GeneralRe: query's problem with periode Pin
bayangan15-Dec-06 3:20
bayangan15-Dec-06 3:20 
QuestionSQL server basic open connection problem Pin
tino003-Dec-06 1:10
tino003-Dec-06 1:10 
AnswerRe: SQL server basic open connection problem Pin
Paul Conrad25-Dec-06 18:24
professionalPaul Conrad25-Dec-06 18:24 
QuestionSQL - Middle Pin
Chira Chandra2-Dec-06 22:11
Chira Chandra2-Dec-06 22:11 
QuestionUploading Sql Database Pin
Ashish Porwal2-Dec-06 1:40
Ashish Porwal2-Dec-06 1:40 
AnswerRe: Uploading Sql Database Pin
Frank Kerrigan4-Dec-06 3:21
Frank Kerrigan4-Dec-06 3:21 
QuestionQuery issue Pin
Tauseef A2-Dec-06 1:38
Tauseef A2-Dec-06 1:38 
AnswerRe: Query issue Pin
Eric Dahlvang4-Dec-06 8:02
Eric Dahlvang4-Dec-06 8:02 
Questionhi Pin
Tauseef A1-Dec-06 21:12
Tauseef A1-Dec-06 21:12 
AnswerRe: hi Pin
Frank Kerrigan4-Dec-06 5:57
Frank Kerrigan4-Dec-06 5:57 
Questionscale down images in sql server Pin
subai1-Dec-06 20:36
subai1-Dec-06 20:36 
Question[Message Deleted] Pin
alexrad1-Dec-06 1:52
alexrad1-Dec-06 1:52 
AnswerRe: DECIMALS Pin
Eric Dahlvang1-Dec-06 4:07
Eric Dahlvang1-Dec-06 4:07 
AnswerRe: DECIMALS Pin
Marek Grzenkowicz1-Dec-06 4:08
Marek Grzenkowicz1-Dec-06 4:08 

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.