Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Select

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-12-28 : 17:44:13
christy writes "I have a question regarding a select statement. Here it goes...
I have a membership number of 123 and I have a identifer of A and B

Here is what the data looks like:

Membership #     identifer  timestamp                     bonus
123 A 2000-05-18-13.18.33.144209 300
123 B 2000-05-12-16.20.33.198750 25
456 A 2000-06-09-15.23.36.124654 100
789 B 2000-06-12-15.13.36.124698 80
000 A 2000-09-09-15.03.36.124600 10


1. What I would like to do would be to write a sql statement that will see that membership number 123 has a identifer of A and B and notice that it is different but yet the membership number is the same. If True, it will then look at the timestamp and it must be within 60 days of todays date and the bonus diffenece should be + or - 10%. and I must be able to read this data wich is housed in 12 tables!

Sounds hard to me! Any help would be appreciated!!!"
   

- Advertisement -