Click here to Skip to main content
15,901,122 members
Home / Discussions / Database
   

Database

 
Questioninserting image Pin
harithadotnet24-Sep-07 23:06
harithadotnet24-Sep-07 23:06 
AnswerRe: inserting image Pin
Pete O'Hanlon25-Sep-07 2:18
mvePete O'Hanlon25-Sep-07 2:18 
QuestionFinding Related Tables Pin
arnoldpinto8424-Sep-07 21:08
arnoldpinto8424-Sep-07 21:08 
AnswerRe: Finding Related Tables Pin
joemonvarghese25-Sep-07 21:01
joemonvarghese25-Sep-07 21:01 
AnswerRe: regarding joins Pin
pmarfleet24-Sep-07 21:32
pmarfleet24-Sep-07 21:32 
General[Message Deleted] Pin
gubba24-Sep-07 21:40
gubba24-Sep-07 21:40 
GeneralRe: regarding joins Pin
pmarfleet24-Sep-07 21:49
pmarfleet24-Sep-07 21:49 
QuestionINSERT INTO sql Pin
phowarso24-Sep-07 19:21
phowarso24-Sep-07 19:21 
AnswerRe: INSERT INTO sql Pin
pmarfleet24-Sep-07 19:41
pmarfleet24-Sep-07 19:41 
GeneralRe: INSERT INTO sql Pin
phowarso25-Sep-07 0:32
phowarso25-Sep-07 0:32 
GeneralRe: INSERT INTO sql Pin
pmarfleet25-Sep-07 0:52
pmarfleet25-Sep-07 0:52 
AnswerRe: INSERT INTO sql Pin
Pete O'Hanlon25-Sep-07 2:21
mvePete O'Hanlon25-Sep-07 2:21 
Question[Message Deleted] Pin
Hari Om Prakash Sharma24-Sep-07 18:59
Hari Om Prakash Sharma24-Sep-07 18:59 
AnswerRe: from_unixtime() function Pin
pmarfleet24-Sep-07 19:47
pmarfleet24-Sep-07 19:47 
AnswerRe: from_unixtime() function Pin
Pete O'Hanlon25-Sep-07 2:36
mvePete O'Hanlon25-Sep-07 2:36 
QuestionTransfering data problem Pin
Pamela198424-Sep-07 11:06
Pamela198424-Sep-07 11:06 
AnswerRe: Transfering data problem Pin
Paul Conrad3-Nov-07 7:49
professionalPaul Conrad3-Nov-07 7:49 
QuestionBackup SQL Server Pin
Bonsta24-Sep-07 7:01
Bonsta24-Sep-07 7:01 
AnswerRe: Backup SQL Server Pin
Paul Conrad3-Nov-07 7:48
professionalPaul Conrad3-Nov-07 7:48 
QuestionProblem with certificate Pin
DerekFL24-Sep-07 5:27
DerekFL24-Sep-07 5:27 
Questionhelp me with outstanding rental payments Pin
twsted f824-Sep-07 5:17
twsted f824-Sep-07 5:17 
Hi

I am currently developing hostel management software for a local hostel. I am trying to find a way of identifying those residents who have outstanding rent payments.

The hotel/ youth hostel requires that its guests pay their rentals at the beginning of the month. The residents often stay at the hostel for periods that are often over 5 months.I need to find a way of finding out which residents have paid their renatals, and which ones have not paid their rents. This is further complicated by the fact that some residents will make one large payment at the beginning of their session and this is meant to cover them for the duration of their stay.

Each session has one account, and the total payments made are stored in the acount. I have also included the rate charged per day and the startdate of the session into the table, such that it is possible to calculate the amount that is owed and this figure can be some how be compared to the amount that has been paid.

Given these circumstances, how can I find the residents who have outstanding rents.

I havce included the table defs below.

Please do feel free to help me.

create table sessions
( sessionNumber int Identity Not null Primary Key,
startdate smalldatetime not null,
enddate smalldatetime not null,
sessionType char(15) not null,
duration int not null,
roomNumber char(5) not null references Rooms (roomNumber),
idNumber char(15) Not null references guestinfo (idnumber),
)

create table accounts
(
receiptNumber int Identity Not Null primary key,
amountpaid money not Null,
datepaid smalldatetime not null,
roomNumber char(5) not null references rooms(roomNumber),
sessionNumber int Not null references sessions(sessionNumber),
paymentType char(10),
userName char(15) Not Null references users (username),
)


---create table accpayments---
( accountNumber int identity Not Null primary key,
sessionNumber int not null references sessions(sessionNumber),
totalpaymentsmade money not null,
amountowing money not null,
rate money not null
)

twsted f8
AnswerRe: help me with outstanding rental payments Pin
pmarfleet24-Sep-07 9:45
pmarfleet24-Sep-07 9:45 
QuestionFind Exact match Pin
jebin k24-Sep-07 5:12
jebin k24-Sep-07 5:12 
AnswerRe: Find Exact match Pin
DerekFL24-Sep-07 7:50
DerekFL24-Sep-07 7:50 
QuestionSQL type statements without a connection Pin
Evan St. John24-Sep-07 4:34
Evan St. John24-Sep-07 4: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.