Click here to Skip to main content
15,907,149 members
Home / Discussions / Database
   

Database

 
QuestionLoading large XML files into db2 Pin
Gktony12-Mar-09 0:46
Gktony12-Mar-09 0:46 
QuestionTransaction Log Backup Too Big Pin
Elizma11-Mar-09 23:40
Elizma11-Mar-09 23:40 
AnswerRe: Transaction Log Backup Too Big Pin
Eddy Vluggen12-Mar-09 3:50
professionalEddy Vluggen12-Mar-09 3:50 
QuestionMultiple Databases Pin
Brendan Vogt11-Mar-09 20:38
Brendan Vogt11-Mar-09 20:38 
AnswerRe: Multiple Databases Pin
Eddy Vluggen12-Mar-09 4:08
professionalEddy Vluggen12-Mar-09 4:08 
GeneralRe: Multiple Databases Pin
Brendan Vogt14-Mar-09 20:32
Brendan Vogt14-Mar-09 20:32 
AnswerRe: Multiple Databases Pin
David Mujica12-Mar-09 4:40
David Mujica12-Mar-09 4:40 
QuestionRe: Multiple Databases Pin
Brendan Vogt14-Mar-09 20:31
Brendan Vogt14-Mar-09 20:31 
AnswerRe: Multiple Databases Pin
Eddy Vluggen15-Mar-09 0:40
professionalEddy Vluggen15-Mar-09 0:40 
GeneralRe: Multiple Databases Pin
Brendan Vogt15-Mar-09 5:25
Brendan Vogt15-Mar-09 5:25 
GeneralRe: Multiple Databases Pin
Eddy Vluggen15-Mar-09 5:47
professionalEddy Vluggen15-Mar-09 5:47 
GeneralReplicate Pin
David Mujica15-Mar-09 5:26
David Mujica15-Mar-09 5:26 
GeneralRe: Replicate Pin
Brendan Vogt15-Mar-09 5:54
Brendan Vogt15-Mar-09 5:54 
Questionselect upcoming birthday? Pin
Meax11-Mar-09 7:13
Meax11-Mar-09 7:13 
AnswerRe: select upcoming birthday? Pin
Syed Mehroz Alam11-Mar-09 7:39
Syed Mehroz Alam11-Mar-09 7:39 
GeneralRe: select upcoming birthday? Pin
Meax11-Mar-09 8:06
Meax11-Mar-09 8:06 
GeneralRe: select upcoming birthday? Pin
Syed Mehroz Alam11-Mar-09 19:39
Syed Mehroz Alam11-Mar-09 19:39 
AnswerRe: select upcoming birthday? Pin
Luc Pattyn11-Mar-09 8:35
sitebuilderLuc Pattyn11-Mar-09 8:35 
GeneralRe: select upcoming birthday? Pin
Meax11-Mar-09 8:38
Meax11-Mar-09 8:38 
AnswerRe: select upcoming birthday? Pin
Luc Pattyn11-Mar-09 8:54
sitebuilderLuc Pattyn11-Mar-09 8:54 
GeneralRe: select upcoming birthday? Pin
Meax11-Mar-09 9:41
Meax11-Mar-09 9:41 
GeneralRe: select upcoming birthday? Pin
Luc Pattyn11-Mar-09 10:10
sitebuilderLuc Pattyn11-Mar-09 10:10 
Hi,

Since the first reply suggested something like
Select Person from UsersProfile where DOB = <br />
     ( Select min(DOB) from UsersProfile where DOB > GetDate() )


it must be rather easy to get it like so:
Select Person from UsersProfile where DOB =<br />
     ( whatever it takes to obtain the next birthday )


So I would try:
Select Person from UsersProfile where DOB =<br />
( SELECT min(datepart(dy,DOB)) FROM UsersProfile WHERE datepart(dy,DOB)>=datepart(dy, now()))


BTW: This is PHP/MySQL code that works for me:
$Query="SELECT * FROM $table WHERE DAYOFYEAR(birthday)= ".
    "(SELECT min(DAYOFYEAR(birthday)) FROM $table ".
    "WHERE DAYOFYEAR(birthday)>=DAYOFYEAR(now()))";


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


GeneralRe: select upcoming birthday? Pin
Meax11-Mar-09 21:10
Meax11-Mar-09 21:10 
GeneralRe: select upcoming birthday? Pin
Jay Royall11-Mar-09 23:00
Jay Royall11-Mar-09 23:00 
GeneralRe: select upcoming birthday? Pin
Meax11-Mar-09 23:27
Meax11-Mar-09 23:27 

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.