Solved

How do i exclude weekend days in a query ?

Posted on 2008-06-23
1
969 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

809 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