473,322 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Strage query behaviour

Hi All,
I have created a query which totals what has been done in a 24hr period.
To display what has been done across all three shifts, I have used the
following expression:

Shift: IIf(TimeValue([dtctime]) Between #06:00:00# And
#14:00:00#,"Earlies",IIf(TimeValue([dtctime]) Between #14:00:00# And
#22:00:00#,"Lates","Nights"))

If I run the query, it runs fine, however, if I remove one the fields from
the query or try to veiw it in SQL view, I receive an error message stating
"Syntax error (missing operator) in query expression '00:00# And
#14:00:00#,"Earlies",IIf(TimeValue([dtctime]) Between #14:00:00# And
#22:00:00#,"Lates","Nights"))'."

Could anyone explain why it is doing this when it works if I run the
query???

Many thanks in advance,

Mark
Nov 13 '05 #1
0 951

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

Similar topics

0
by: Ethel Aardvark | last post by:
I am running a 9.0.1 database on a W2K server and have come across some strange behaviour with a SQL query. I have a query which runs in a PL/SQL cursor which has several PL/SQL variables used to...
22
by: Robert Brown | last post by:
suppose I have the following table: CREATE TABLE (int level, color varchar, length int, width int, height int) It has the following rows 1, "RED", 8, 10, 12 2, NULL, NULL, NULL, 20...
0
by: Georges Heinesch | last post by:
I discovered a weird behaviour regarding a query and a combobox based on that query. 3 tables: Food: Food_ID number (autonumber - primary key) Number number Fruit_ID combobox
1
by: Wayne Aprato | last post by:
I have a couple of Access 2000 and 2002 databases which have exhibited the following behaviour. The mdb works fine but the mde causes access to shut down on an error when a particular query is...
2
by: carl.barrett | last post by:
Hi, I'm back with the same question as I still can't get it to display my data the way I want it to. The table lists information about a perpetrator involved with an anti social behaviour...
9
by: Mark | last post by:
I've run a few simple tests looking at how query string encoding/decoding gets handled in asp.net, and it seems like the situation is even messier than it was in asp... Can't say I think much of the...
0
by: LoopyNZ | last post by:
I'm sure this has something to do with NULLS, but I just can't get my head around this behaviour. More importantly, I can't SOLVE this behaviour, and until I do I can't have any confidence in my...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.