Click here to Skip to main content
15,397,224 members
Home / Discussions / Database
   

Database

 
AnswerRe: java prog to sort million input Pin
Afzaal Ahmad Zeeshan18-May-15 3:51
mveAfzaal 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
MemberSohail 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
MemberKaran_TN11-May-15 3:15 
AnswerRe: Get date not exist Pin
Tim Carmichael11-May-15 4:49
MemberTim Carmichael11-May-15 4:49 
AnswerRe: Get date not exist Pin
MarbryH11-May-15 5:48
MemberMarbryH11-May-15 5:48 
AnswerRe: Get date not exist Pin
Richard Deeming11-May-15 8:04
mveRichard Deeming11-May-15 8:04 
Something like this should work:
SQL
WITH cteTally (N) As
(
    SELECT TOP 21 -- 15 weekdays + 6 weekend days
        ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) - 1
    FROM
        sys.objects
),
cteDays (TheDate) As
(
    SELECT
        DATEADD(day, -N, GetUtcDate())
    FROM
        cteTally
)
SELECT
    TheDate
FROM
    cteDays As D
WHERE
    ((DATEPART(dw, TheDate) + @@DATEFIRST) % 7) Not In (0, 1)
And
    Not Exists
    (
        SELECT 1
        FROM table1 As T
        WHERE T.inserteddate = D.TheDate
    )
ORDER BY
    TheDate DESC
;




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


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
MemberMember 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
Memberturnerdavid7-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
Memberturnerdavid7-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
Memberturnerdavid7-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
Memberturnerdavid7-May-15 10:26 
GeneralRe: update query not updating Pin
ZurdoDev7-May-15 10:35
professionalZurdoDev7-May-15 10:35 
QuestionSybase Access Violaion Error Pin
Ankit RS6-May-15 21:32
MemberAnkit RS6-May-15 21:32 
SuggestionRe: Sybase Access Violaion Error Pin
ZurdoDev7-May-15 4:08
professionalZurdoDev7-May-15 4:08 
GeneralRe: Sybase Access Violaion Error Pin
Sascha Lefèvre7-May-15 6:25
professionalSascha Lefèvre7-May-15 6:25 

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.