Solved

How do i exclude weekend days in a query ?

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
find SQL job run average duration 24 57
SQL Job Hung 17 37
Return Rows as per Quantity of Columns Value In SQL 6 28
Need a mirrored QA test site 2 8
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

726 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