Solved

How do i exclude weekend days in a query ?

Posted on 2008-06-23
1
948 Views
Last Modified: 2009-08-18
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.assignment
0
Comment
Question by:basile
1 Comment
 
LVL 31

Accepted Solution

by:
James Murrell earned 500 total points
ID: 21850714
Hello basile,

http://www.dbforums.com/showthread.php?t=515739

Regards,

cs97jjm3
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now