Advertisement

06.23.2008 at 02:50PM PDT, ID: 23509272
[x]
Attachment Details

How do i exclude weekend days in a query ?

Asked by basile in MS SQL Server, SQL Server 2005

Tags: Microsoft, SQL Server, 2005

I'm using the query below, which works fine, now i want to take it one stpe further and exclude all weekends....

SELECT  a.number,
        a.contact_name,
        a.category,
        b.subcategory,
        a.brief_description,
        a.open_time,
        a.assignment,
        a.status,
        b.problem_status,
        b.ticket_owner
FROM    probsummarym1 a
        INNER JOIN probsummarym3 b ON a.number = b.number
WHERE   datediff(d, open_time, GETDATE()) > 3
        AND b.problem_status <> 'Closed'
ORDER BY a.assignmentStart Free Trial
[+][-]06.23.2008 at 02:55PM PDT, ID: 21850714

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, SQL Server 2005
Tags: Microsoft, SQL Server, 2005
Sign Up Now!
Solution Provided By: cs97jjm3
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628