MS SQl Job Agent

  • Hi,

    Currently I am working on a Job Portal in ASP.Net 2.0 and SQL Server 2005. I have to create a Job Agent which does the following.

    I have briefed the working as below. The Agent Table stores the information of the Search Criteria of the JobSeeker and the frequency of results which is one of (Daily, Weekly, BiWeekly, Monthly, hourly and Daily).Based on the frequency of results,the search criteria should search in JobPosting Table and the the results are to be emailed to the JobSeeker Email Id. This whole process is to be done as SQL Job executing for every hour. The Search in Job Posting by Search Criteria is ready. The databases where the Table lies is also mentioned

    Database 1 Database1 Database 2 Database1

    AgentTable JobSeekerTable MemberShip JobPosting

    ------------------------------------------------------------------------------------------------------------------------------------

    Frequency of Results JobSeekerId UserName SearchCriteria

    JobSeekerId UserName Email JobPostingId

    SearchCriteria

    Can any one help me to write the SQL Job or atleast give me a help url for developing the same

    Thanks,

    Uma Ramiya

  • I think you will have to be a bit more clear in wording your problem in order to get the help you need.


    Regards,

    goodguy

    Experience is a bad teacher whose exams precede its lessons

  • I got a solution through msdn forums. For those who are interested.

    search query with results into #matches

    open a CURSOR on the #matches table

    FETCH ...............

    WHILE @@FETCH_STATUS = 0

    BEGIN

    Code SnippetEXEC msdb.dbo.sp_send_dbmail@recipients=N'developercharlie@gmail.com',@body='Message Body1 '+@var1+'Message body2'...., @sensitivity ='Personal', @importance ='High', @copy_recipients ='headhunter1@gmail.com',@subject ='Message Subject',@profile_name ='eMailOmega';

    FETCH..............

    END

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply