Solved

Access query date value

Posted on 2008-10-17
1
276 Views
Last Modified: 2010-03-20
hello, I want my query to only list records where the field [CO].[ORDER_DATE] is not equal to the field [ PR].[DATE] plus 1-7 DAYS

please add it to my attached SQL, for me to copy/paste

thank you very much
SELECT COL.CUST_ORDER_ID AS [ordr ID], CO.ORDER_DATE AS [ordr date], CO.ORDER_DATE, PR.DATE
FROM Promoted AS PR RIGHT JOIN (SYSADM_CUSTOMER_ORDER AS CO INNER JOIN SYSADM_CUST_ORDER_LINE AS COL ON CO.ID = COL.CUST_ORDER_ID) ON PR.[PART #] = COL.PART_ID
ORDER BY COL.CUST_ORDER_ID;

Open in new window

0
Comment
Question by:gringotani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 25 total points
ID: 22746896
SELECT COL.CUST_ORDER_ID AS [ordr ID], CO.ORDER_DATE AS [ordr date], CO.ORDER_DATE, PR.DATE
FROM Promoted AS PR RIGHT JOIN (SYSADM_CUSTOMER_ORDER AS CO INNER JOIN SYSADM_CUST_ORDER_LINE AS COL ON CO.ID = COL.CUST_ORDER_ID) ON PR.[PART #] = COL.PART_ID
where ([co].[order_date] <= dateadd("d", 1, [pr].[date]) or [co].[date] > dateadd("d",7,[pr].[date]))
ORDER BY COL.CUST_ORDER_ID;
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

705 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