Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 08-05-2004, 09:01 AM   #1 (permalink)
Upright
 
[SQL] MSAccess Where Clause with Case statement syntax error...

Is there something obviously wrong with this where clause?

Code:
WHERE
rt_BEHI_BHBH.Index = (
CASE
WHEN  qry_BEHI_values.BHBHValue < (SELECT MIN(Value) FROM rt_BEHI_BHBH) THEN 1
WHEN  qry_BEHI_values.BHBHValue > (SELECT MAX(Value) FROM rt_BEHI_BHBH) THEN 10
ELSE (SELECT Index FROM rt_BEHI_BHBH WHERE Value =  qry_BEHI_values.BHBHValue)
END )
I've been staring at this for a while, and I can't get it right. Access just gives a generic syntax error (missing operator) for the case statement.
moskie_work is offline  
Old 08-05-2004, 07:59 PM   #2 (permalink)
Pure Chewing Satisfaction
 
Moskie's Avatar
 
Location: can i use bbcode [i]here[/i]?
Want to know what the problem was?


Access doesn't support case statements!

Kill me now.
__________________
Greetings and salutations.
Moskie is offline  
Old 08-11-2004, 03:48 AM   #3 (permalink)
Tilted
 
Location: Jersey City
Quote:
Originally posted by Moskie
Want to know what the problem was?


Access doesn't support case statements!

Kill me now.
Access's default SQL doesn't support a lot of things.

Will it work as a pass-through query? We do a lot of this where I work when someone needs Access to interact with an outside database. Access tries to format all SQL into Access-deformed-SQL unless you specify that the query is a pass-through query. (Not sure if this will help if your data is in Access as well).

w0
__________________
My other sig says something clever.
WildZero is offline  
 

Tags
case, clause, error, msaccess, sql, statement, syntax


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 05:25 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54