I don't know if your schema contains a table holding transaction level
information, if it does, could you not use the "IN" function to identify
such accounts?
|-----Original Message-----
|From: Imar Spaanjaars [mailto:Imar@S...]
|Sent: 18 September 2002 11:28
|To: sql language
|Subject: [sql_language] Re: Advanced select
|
|
|Hi there,
|
|Where are "amount from year 1999" and "amount from year 2001" stored?
|
|This information is necessary to create a valid SQL statement. Please
|provide the table structure.
|
|Also, is it possible that people both ADD and WITHDRAW from the accounts
|table??
|In that case, an amount that equals last years, is not necessarily an
|inactive account. I may just have withdrawn as much as I have added......
|
|
|Imar
|
|
|
|
|At 11:28 AM 9/18/2002 +0000, you wrote:
|>Hello falks,
|>
|>I have a database where some accounts/projects have been without activity
|>for a long time. I would like to retrieve these accounts/projects from the
|>database using the amount field, but I am not sure how I would write this:
|>select * from TableName
|>where amount from year 1999 equals amount from year 2001
|>
|>If the amount from previous years has stayed the same, that means that the
|>account has been inactive.
|>
|>Please help. Thanks!
|>
|>Poll7
|
|
|
|
|