Click here to Skip to main content
15,890,506 members
Home / Discussions / Database
   

Database

 
AnswerRe: Passing an array of integers to a stored procedure Pin
Orina DCosta22-Sep-05 10:58
Orina DCosta22-Sep-05 10:58 
GeneralRe: Passing an array of integers to a stored procedure Pin
Luis Alonso Ramos22-Sep-05 17:11
Luis Alonso Ramos22-Sep-05 17:11 
GeneralRe: Passing an array of integers to a stored procedure Pin
Christian Graus22-Sep-05 17:24
protectorChristian Graus22-Sep-05 17:24 
GeneralRe: Passing an array of integers to a stored procedure Pin
Luis Alonso Ramos23-Sep-05 6:35
Luis Alonso Ramos23-Sep-05 6:35 
GeneralRe: Passing an array of integers to a stored procedure Pin
Christian Graus25-Sep-05 12:15
protectorChristian Graus25-Sep-05 12:15 
Questionselecting data from one table and copy them into another Pin
achrafus22-Sep-05 5:52
achrafus22-Sep-05 5:52 
AnswerRe: selecting data from one table and copy them into another Pin
Colin Angus Mackay22-Sep-05 6:55
Colin Angus Mackay22-Sep-05 6:55 
GeneralRe: selecting data from one table and copy them into another Pin
achrafus22-Sep-05 7:38
achrafus22-Sep-05 7:38 
thank u Mr Mackay,
my tables look like this
inhabitant
----------
inhabitantId
... info about inhabitant

Appartment
----------
AppartementId
inhabitantId
Amount //the amount that the inhabitant shoul pay monthly

Payement
---------
inhabitantId
AmountPayed //the amount payed is what's paid each month if done
date //date the the paid amount

PostponedPayement
-----------------
InhabitantId
amountdue
Referencedate //the reference of the unpaid month

I need to get the inhabitants that didn't pay for each month and store these in my PostponedPayement table.
for example

Appartement Inhabitant Payement
--------------------| ----------------| ----------------------------
ApptId inhId Amount| InhID | InhaName| inhId |paidAmount|Date
--------------------| ------|---------| -------|----------|---------
177/R1 inh1 150 | inh1 | James | inh1 | 150 |01/08/2005
177/R2 inh2 180 | inh2 | Jone | inh4 | 100 |05/08/2005
177/R3 inh3 150 | inh3 | Greg |
177/R4 inh4 100 | inh4 | mike |

in my PostponedPayment table I need to get this for august payments plus what is left from other months

PostponedPayement
------------------------------
InhabitantId|AmountDue|Refdate|
------------|---------|-------|
inh2 | 180 |08/2005|
inh3 | 150 |08/2005|
inh1 | 150 |06/2005|
I did the following query to get all those who paid and those who didn't :
select Appartement.ApptId, date, Payement.Amount from Appartement left join Payement on Payement.ApptId=Appartement.ApptId
I get the following

---------------------------------
InhabitantId|Amount | date |
------------|---------|----------|
inh1 | 150 |01/08/2005|
inh4 | 150 |05/08/2005|
inh2 | Null | null |
inh3 | Null | null |
all I need to pik up are the 2 last values in the example and insert them into PostponedPayment
Hope it's clearer now!excuse my English
But I thank yu very much


Thanks to all those who help and those who try to help
QuestionSQL Server Reporting Reset Page count or use distinctcount() for page number Pin
bubberz22-Sep-05 5:12
bubberz22-Sep-05 5:12 
AnswerRe: SQL Server Reporting Reset Page count or use distinctcount() for page number Pin
bubberz22-Sep-05 7:58
bubberz22-Sep-05 7:58 
AnswerRe: SQL Server Reporting Reset Page count or use distinctcount() for page number Pin
bubberz22-Sep-05 11:02
bubberz22-Sep-05 11:02 
QuestionMs-Access Vs Sql-Server 2000 Pin
Naveed Kamboh22-Sep-05 4:37
Naveed Kamboh22-Sep-05 4:37 
AnswerRe: Ms-Access Vs Sql-Server 2000 Pin
miah alom22-Sep-05 5:14
miah alom22-Sep-05 5:14 
AnswerRe: Ms-Access Vs Sql-Server 2000 Pin
Luis Alonso Ramos22-Sep-05 7:16
Luis Alonso Ramos22-Sep-05 7:16 
GeneralRe: Ms-Access Vs Sql-Server 2000 Pin
Naveed Kamboh23-Sep-05 3:01
Naveed Kamboh23-Sep-05 3:01 
QuestionSelect Pin
NormBohana21-Sep-05 15:09
NormBohana21-Sep-05 15:09 
AnswerRe: Select Pin
Christian Graus21-Sep-05 15:38
protectorChristian Graus21-Sep-05 15:38 
AnswerRe: Select Pin
miah alom22-Sep-05 3:26
miah alom22-Sep-05 3:26 
QuestionStored Query in Access Pin
kornstyle21-Sep-05 8:53
kornstyle21-Sep-05 8:53 
AnswerRe: Stored Query in Access Pin
Christian Graus21-Sep-05 15:40
protectorChristian Graus21-Sep-05 15:40 
QuestionUpdate Pin
Illegal Operation21-Sep-05 2:29
Illegal Operation21-Sep-05 2:29 
AnswerRe: Update Pin
Christian Graus21-Sep-05 15:39
protectorChristian Graus21-Sep-05 15:39 
QuestionExpression column in a Datatable not evaluating Pin
convergence21-Sep-05 0:22
convergence21-Sep-05 0:22 
AnswerRe: Expression column in a Datatable not evaluating Pin
sreejith ss nair21-Sep-05 0:49
sreejith ss nair21-Sep-05 0:49 
GeneralRe: Expression column in a Datatable not evaluating Pin
convergence21-Sep-05 2:36
convergence21-Sep-05 2: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.