Click here to Skip to main content
15,922,166 members
Home / Discussions / Database
   

Database

 
Questioncolumn to row Pin
Shrita26-Jul-07 13:42
Shrita26-Jul-07 13:42 
QuestionHow to get the table size (Byte)? Pin
Khoramdin26-Jul-07 9:25
Khoramdin26-Jul-07 9:25 
AnswerRe: How to get the table size (Byte)? Pin
Krish - KP26-Jul-07 21:35
Krish - KP26-Jul-07 21:35 
QuestionSQL SELECT query Pin
xoxoxoxoxoxox26-Jul-07 7:09
xoxoxoxoxoxox26-Jul-07 7:09 
AnswerRe: SQL SELECT query Pin
andyharman26-Jul-07 7:32
professionalandyharman26-Jul-07 7:32 
AnswerRe: SQL SELECT query Pin
Krish - KP26-Jul-07 21:33
Krish - KP26-Jul-07 21:33 
QuestionSelect employees haveing thier birthday with in coming 2 weeks Pin
Vipin.d26-Jul-07 5:52
Vipin.d26-Jul-07 5:52 
AnswerRe: Select employees haveing thier birthday with in coming 2 weeks Pin
andyharman26-Jul-07 6:43
professionalandyharman26-Jul-07 6:43 
For SQL-Server it would be something like:
select * from Employee
where datepart(dy, BirthDate) between datepart(dy, GetDate()) and datepart(dy, GetDate()) + 14
or 365 + datepart(dy, BirthDate) between datepart(dy, GetDate()) and datepart(dy, GetDate()) + 14
The "or" condition traps the situation where today is in the last couple of weeks of December and the employee's birthday falls at the start of January. You might need to play with the boundary conditions (i.e. the "365" and "14" constants).

Regards
Andy

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message".

GeneralRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Vipin.d27-Jul-07 20:47
Vipin.d27-Jul-07 20:47 
AnswerRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Pete O'Hanlon26-Jul-07 8:53
mvePete O'Hanlon26-Jul-07 8:53 
GeneralRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Vipin.d27-Jul-07 20:26
Vipin.d27-Jul-07 20:26 
GeneralRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Pete O'Hanlon29-Jul-07 10:15
mvePete O'Hanlon29-Jul-07 10:15 
AnswerRe: Select employees haveing thier birthday with in coming 2 weeks Pin
Vipin.d27-Jul-07 20:48
Vipin.d27-Jul-07 20:48 
QuestionProblem with calling Scalar Function Pin
--miCZar--26-Jul-07 3:55
--miCZar--26-Jul-07 3:55 
AnswerRe: Problem with calling Scalar Function Pin
Blue_Boy26-Jul-07 4:13
Blue_Boy26-Jul-07 4:13 
GeneralRe: Problem with calling Scalar Function Pin
--miCZar--26-Jul-07 22:25
--miCZar--26-Jul-07 22:25 
AnswerRe: Problem with calling Scalar Function Pin
andyharman26-Jul-07 6:54
professionalandyharman26-Jul-07 6:54 
GeneralRe: Problem with calling Scalar Function Pin
--miCZar--26-Jul-07 22:27
--miCZar--26-Jul-07 22:27 
AnswerRe: Problem with calling Scalar Function Pin
Pete O'Hanlon26-Jul-07 9:41
mvePete O'Hanlon26-Jul-07 9:41 
Questioninserting values by checking the existing values Pin
dsaikrishna26-Jul-07 2:30
dsaikrishna26-Jul-07 2:30 
AnswerRe: inserting values by checking the existing values Pin
Mubashir Javaid26-Jul-07 2:42
Mubashir Javaid26-Jul-07 2:42 
Questiongetting second highest date from a sql table Pin
hkchauhan26-Jul-07 2:16
hkchauhan26-Jul-07 2:16 
AnswerRe: getting second highest date from a sql table Pin
Krish - KP26-Jul-07 2:21
Krish - KP26-Jul-07 2:21 
AnswerRe: getting second highest date from a sql table Pin
hk7792126-Jul-07 2:34
hk7792126-Jul-07 2:34 
Questioninserting values by checking the existing values Pin
dsaikrishna26-Jul-07 2:12
dsaikrishna26-Jul-07 2:12 

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.