Click here to Skip to main content
15,867,834 members
Home / Discussions / Database
   

Database

 
Questionjava prog to sort million input Pin
Sohail Sowell17-May-15 20:26
Sohail Sowell17-May-15 20:26 
AnswerRe: java prog to sort million input Pin
Jörgen Andersson17-May-15 20:32
professionalJörgen Andersson17-May-15 20:32 
AnswerRe: java prog to sort million input Pin
Eddy Vluggen18-May-15 2:38
professionalEddy Vluggen18-May-15 2:38 
AnswerRe: java prog to sort million input Pin
Afzaal Ahmad Zeeshan18-May-15 3:51
professionalAfzaal Ahmad Zeeshan18-May-15 3:51 
GeneralRe: java prog to sort million input Pin
Mycroft Holmes20-May-15 14:37
professionalMycroft Holmes20-May-15 14:37 
QuestionJAVA PROGRAM Pin
Sohail Sowell17-May-15 20:26
Sohail Sowell17-May-15 20:26 
AnswerRe: JAVA PROGRAM Pin
ZurdoDev22-May-15 4:41
professionalZurdoDev22-May-15 4:41 
QuestionGet date not exist Pin
Karan_TN11-May-15 3:15
Karan_TN11-May-15 3:15 
I am using sql server 2005.
I have a column with date values (say column1). I need to fetch the date which does not exist in the past 15 days.
Means : user insert records daily. But on May 1st due to leave no records got inserted. So I need to analyse past 15 days (from current date) and fetch only May 1st.

I tried below query.But its return the past 15 days (excluding weekends). But i need days which not exist in past 15 days.

SQL
select distinct top 15 inserteddate from table1 where
((DATEPART(dw, inserteddate) + @@DATEFIRST) % 7) NOT IN (0, 1) and ( inserteddate >= DATEADD(DAY,-15,inserteddate) and inserteddate <= getdate())
order by inserteddate desc



Help me pls.

modified 11-May-15 9:22am.

AnswerRe: Get date not exist Pin
Tim Carmichael11-May-15 4:49
Tim Carmichael11-May-15 4:49 
AnswerRe: Get date not exist Pin
MarbryH11-May-15 5:48
MarbryH11-May-15 5:48 
AnswerRe: Get date not exist Pin
Richard Deeming11-May-15 8:04
mveRichard Deeming11-May-15 8:04 
GeneralRe: Get date not exist Pin
Mycroft Holmes11-May-15 13:10
professionalMycroft Holmes11-May-15 13:10 
GeneralRe: Get date not exist Pin
Richard Deeming12-May-15 1:39
mveRichard Deeming12-May-15 1:39 
GeneralRe: Get date not exist Pin
Mycroft Holmes12-May-15 14:11
professionalMycroft Holmes12-May-15 14:11 
QuestionDatabase Pin
Member 116493918-May-15 19:14
Member 116493918-May-15 19:14 
QuestionRe: Database Pin
Richard MacCutchan8-May-15 21:40
mveRichard MacCutchan8-May-15 21:40 
AnswerRe: Database Pin
Richard Andrew x649-May-15 6:16
professionalRichard Andrew x649-May-15 6:16 
Questionupdate query not updating Pin
turnerdavid7-May-15 3:55
turnerdavid7-May-15 3:55 
AnswerRe: update query not updating Pin
ZurdoDev7-May-15 4:12
professionalZurdoDev7-May-15 4:12 
GeneralRe: update query not updating Pin
turnerdavid7-May-15 8:08
turnerdavid7-May-15 8:08 
GeneralRe: update query not updating Pin
ZurdoDev7-May-15 8:12
professionalZurdoDev7-May-15 8:12 
GeneralRe: update query not updating Pin
turnerdavid7-May-15 8:18
turnerdavid7-May-15 8:18 
GeneralRe: update query not updating Pin
ZurdoDev7-May-15 8:58
professionalZurdoDev7-May-15 8:58 
GeneralRe: update query not updating Pin
turnerdavid7-May-15 10:26
turnerdavid7-May-15 10:26 
GeneralRe: update query not updating Pin
ZurdoDev7-May-15 10:35
professionalZurdoDev7-May-15 10:35 

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.