Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding send a mail automatically for birthdays before 3 days

 
surya.raaj prakash
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Friends,

I have one requirement,i.e How to create SOL Query send a mail automatically for birthdays before 3 days?

 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SQL and JDBC are for accessing databases, not for sending mails; check out the JavaMail API for that (the JavaEnterpriseEditionFaq has helpful links about it).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or are you asking how to do a query to get dates less than 3 days away? If so, what database are you using? Have you looked at the date functions for that database?
 
surya.raaj prakash
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Or are you asking how to do a query to get dates less than 3 days away? If so, what database are you using? Have you looked at the date functions for that database?


Hi Jeanne Boyarsky,

Yes,
MySql,
yes,I have looked at date functions but i couldn't get the right query to to send mail before 3 days..
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so the problem has nothing to do with sending emails, and everything to do with writing a SELECT statement. Post the statement you have used so far, and describe which records it -correctly or incorrectly- selects. Also tell us the data types and sample values of the involved attributes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic