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)
 Batch process in SQL.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-12-08 : 09:05:28
Cypher writes "Here is my question. English is not my mother tongue, excuse my French then...

I designed a WebApp (www.e-cologis.com), that acts as a Find-a-rommate service. I would like to provide my members with an alert system (For each member having activated the "alert", I want to provide them -through mail- with new material (i.e other members matching their request.)

The query should plays mainly with the Users Table.
This table contains a boolean field (Us_Modif) that is true by default (when the user first register) and everytime this particular user edits his profile.
Therefore it should be set to false once the batch process has been done (update Users set Us_Modif=0), so that an user doesn't receive everytime the same matches...

A part from the Us_modif, the User Table has a Us_Alert field that stores the customized request of the User (in SQL , of Course. It is a recursive one : Select * from Users Connected, Users Requested where...).

Here's the table User
_____________________
Us_Id
Us_Name
Us_Login
Us_City
...
Us_Modif
Us_alert
...

Therefore I believe I have to "SELECT Us_Alert, Us_Mail FROM Users where len(Us_Alert)>0"

And for each given Us_alert (sql query) append the "where Requested.Us_Modif=true

For each given "User to alert" send a result of the corresponding Matches'Login (if any) to an ASP page so that it can process a mail send on a custom basis.

I hope I made myself clear.

I tried to use Cursor and other FETCH_STATUS things, but I just can't handle it.
Thanxx for your help.
Bye."
   

- Advertisement -