473,473 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem using an interlocked WHERE-Clause

Hi everybody,

I have a problem with my SQL-Statement:

SELECT *
FROM [Excel Export Query]
WHERE (((Year > 2003) And (Month <= 6)) Or (Year = 2003))

The WHERE-clause doesn't work properly. As result I receive all
entries from 2003 and 2004 where the month is <= 6.
But I need to get all entries from 2003 (month 1-12) and the entries
from 2004 (month 1-6).

Does anybody know, why this interlocked statement doesn't work?

THANK YOU SO MUCH!

Best wishes,
Stephan
Nov 13 '05 #1
2 1382
Hi Stephan
Try
WHERE (((Year([YourDateField]) > 2003) And (Month([YourDateField]) <= 6)) Or
(Year([YourDateField) = 2003))

Stewart

"kuhni" <st************@gmx.de> wrote in message
news:88**************************@posting.google.c om...
Hi everybody,

I have a problem with my SQL-Statement:

SELECT *
FROM [Excel Export Query]
WHERE (((Year > 2003) And (Month <= 6)) Or (Year = 2003))

The WHERE-clause doesn't work properly. As result I receive all
entries from 2003 and 2004 where the month is <= 6.
But I need to get all entries from 2003 (month 1-12) and the entries
from 2004 (month 1-6).

Does anybody know, why this interlocked statement doesn't work?

THANK YOU SO MUCH!

Best wishes,
Stephan

Nov 13 '05 #2

"kuhni" <st************@gmx.de> wrote in message
news:88**************************@posting.google.c om...
Hi everybody,

I have a problem with my SQL-Statement:

SELECT *
FROM [Excel Export Query]
WHERE (((Year > 2003) And (Month <= 6)) Or (Year = 2003))

The WHERE-clause doesn't work properly. As result I receive all
entries from 2003 and 2004 where the month is <= 6.
But I need to get all entries from 2003 (month 1-12) and the entries
from 2004 (month 1-6).

Does anybody know, why this interlocked statement doesn't work?


SELECT *
FROM [Excel Export Query]
WHERE
([Year] = 2003)
OR
([Year] = 2004 AND [Month] <= 6)
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: steve | last post by:
// What I want to do Use enumerated types with the Interlocked.Exchange methods Suggestions please // My estimation of problem Seems like Interlocked.Exchange only works with ints,...
0
by: Kruz | last post by:
Somewhere around 500 connections when calls (BeginSend calls) are arround 108,752 and total bytes sent are around 9,496,399 bytes - send callbacks (EndSend) stop coming in C# asynchronous sockets....
5
by: mrkbrndck | last post by:
Please see the code below as I am trying to use multithreading for copying files to a new location in a way that improves performance of the client windows application. The problem occurs when 2...
3
by: Ryan Liu | last post by:
Hi, Can some one tell the criteria I can used to decide use of Interlocked.Increment() vs volatile , which is better? Thanks a lot! Ryan
8
by: Dave | last post by:
I am trying to write an event-driven application with no main window that runs "forever". It waits on a named event and then displays a window depending on data pased in a memory-mapped file. I...
23
by: Anders Borum | last post by:
Hi! I am implementing a threaded producer / consumer pattern just for fun. I am using an internal counter to keep track of the produced / consumed items and am logging that information. I am...
15
by: Ryan Liu | last post by:
Hi, Is there any known bug related to Interlocked.Increment(ref var)? My client report var's value going up and down in the client/server multile-thread application. There are about 80...
4
by: rosco | last post by:
I have a multi threading application where multiple threads can read and write to the property. I try to avoid the lock statement on properties that hold none business critical data. I could...
1
by: ahobart | last post by:
Hello, I have this code in C# and it works perfect: protected string GetUniqueName(string filename) { string temp = filename; for (int x=1; System.IO.File.Exists(temp); x++){ temp =...
13
by: AliRezaGoogle | last post by:
Dear Members, I have a problem in the concepts of Monit.Enter and Monitor.Exit (Before everything I should say that I know how to solve this problem by using Monitor.Wait and I do not need a...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.