Click here to Skip to main content
15,894,955 members
Home / Discussions / Database
   

Database

 
AnswerRe: Retrieving a DateTime value with OracleClient Pin
Chris Meech5-May-10 2:56
Chris Meech5-May-10 2:56 
GeneralRe: Retrieving a DateTime value with OracleClient Pin
David Skelly5-May-10 4:49
David Skelly5-May-10 4:49 
GeneralRe: Retrieving a DateTime value with OracleClient Pin
Bernhard Hiller6-May-10 21:36
Bernhard Hiller6-May-10 21:36 
QuestionSQL Server 2008 Spatial Data Pin
Bassam Saoud4-May-10 4:34
Bassam Saoud4-May-10 4:34 
AnswerRe: SQL Server 2008 Spatial Data Pin
Peter_in_27805-May-10 18:36
professionalPeter_in_27805-May-10 18:36 
GeneralRe: SQL Server 2008 Spatial Data Pin
Bassam Saoud6-May-10 4:09
Bassam Saoud6-May-10 4:09 
Questionhow to write querry for this month,3months ,6months,annual Pin
developerit4-May-10 1:05
developerit4-May-10 1:05 
AnswerRe: how to write querry for this month,3months ,6months,annual Pin
Corporal Agarn4-May-10 6:35
professionalCorporal Agarn4-May-10 6:35 
It looks like you need a job to run every day that by using two datediff criteria using an OR between them.

This could then get the list that is sent to.

Sorry I cannot be more specific as I am installing SQL 2008 R2 on my system, so I cannot try an example.

See BOL for Datediff and you will use days I would suggest using days for the month also as that would prevent the letter from being sent every day of the month.

SELECT * FROM branch 
WHERE DATEDIFF('dd', GETDATE(), EndDate) = ContractReminder 
OR DATEDIFF ('dd', GETDATE(), EndDate) = ReminderType * 30
NOT TESTED

Good Luck,
djj
GeneralRe: how to write querry for this month,3months ,6months,annual Pin
developerit4-May-10 21:05
developerit4-May-10 21:05 
GeneralRe: how to write querry for this month,3months ,6months,annual Pin
Corporal Agarn5-May-10 1:57
professionalCorporal Agarn5-May-10 1:57 
AnswerRe: how to write querry for this month,3months ,6months,annual Pin
Simon_Whale4-May-10 23:22
Simon_Whale4-May-10 23:22 
QuestionSearch based on percentage - sql server 2005 Pin
abcurl4-May-10 0:04
abcurl4-May-10 0:04 
AnswerRe: Search based on percentage - sql server 2005 Pin
Simon_Whale4-May-10 23:33
Simon_Whale4-May-10 23:33 
Questionproblem with Query Pin
mjawadkhatri3-May-10 21:22
mjawadkhatri3-May-10 21:22 
AnswerRe: problem with Query Pin
Paramhans Dubey3-May-10 22:08
professionalParamhans Dubey3-May-10 22:08 
GeneralRe: problem with Query Pin
mjawadkhatri3-May-10 22:16
mjawadkhatri3-May-10 22:16 
GeneralRe: problem with Query Pin
mjawadkhatri3-May-10 22:26
mjawadkhatri3-May-10 22:26 
AnswerRe: problem with Query Pin
Simon_Whale4-May-10 23:26
Simon_Whale4-May-10 23:26 
QuestionSQL Server Indexes [modified] Pin
mobius1110013-May-10 3:13
mobius1110013-May-10 3:13 
AnswerRe: SQL Server Indexes Pin
Luc Pattyn3-May-10 4:15
sitebuilderLuc Pattyn3-May-10 4:15 
GeneralRe: SQL Server Indexes Pin
mobius1110013-May-10 4:35
mobius1110013-May-10 4:35 
AnswerRe: SQL Server Indexes Pin
Henry Minute3-May-10 4:28
Henry Minute3-May-10 4:28 
AnswerRe: SQL Server Indexes Pin
Luc Pattyn3-May-10 4:53
sitebuilderLuc Pattyn3-May-10 4:53 
GeneralRe: SQL Server Indexes Pin
Henry Minute3-May-10 4:58
Henry Minute3-May-10 4:58 
GeneralRe: SQL Server Indexes Pin
Luc Pattyn3-May-10 5:05
sitebuilderLuc Pattyn3-May-10 5:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.