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.
| Author |
Topic |
|
daniel.newman@bis-web.net
Yak Posting Veteran
71 Posts |
Posted - 2001-09-18 : 06:50:46
|
| Hello,I have a database with 8 tables in it. Four of these are four registrants, and the other four are for job positions.What I want it to run a file (vbs) every night, that will send an email message to everybody within the registered users table about new jobs posted in the other tables.My choices:1. I open up a recordset of all of todays jobs, and scroll through it matching users to jobs. This is probably the easiest option, but if I have one user who's interested in lots of jobs, it's possible that person may receive many seperate emails from me. This is what I'm trying to avoid.2. Create a temp table joining the users tables, and then matching this to todays jobs. I'd then need to scroll through the recordset bringing all of the same users jobs togather, and sending them a summary.My tables are like this:Vacancies::RefNo varchar(10)JobTitle varchar(255)whShort varchar(6)typeID intlocID intInterest_Address::UserEmail varchar(255)Interest_WorkingHours::UserEmail varchar(255)whShort varchar(6)Interest_Location::UserEmail varchar(255)locID intInterest_JobTypes::UserEmail varchar(255)typeID intSo, would creating a temp table of::UserEmailwhShortlocIDtypeIDbe a suitable way to search against the Vacancy table?SELECT * FROM vacancies INNER JOIN #temp WHERE #temp.whShort = vacancies.whShort AND...Any advice on which is the best way to and do this would be most useful.Thanks |
|
|
|
|
|