> From: Claude Schneegans
>
> Sure, this is standard SQL: in a SELECT <Value
> _expression_>,... a value _expression_ can be a column name, a
> function or any combination in an _expression_. If the
> _expression_ is boolean, the column should contain true, false
> or null. This works in Access, not in MS SQL ?

I don't think you can do evaluations like that in standard ANSI SQL -
you'd have to run a function on it

What you have to remember is that Access has a LOT of "shortcuts" in it
that aren't anything to do with standard SQL

> Also, I've note been able to use the column "prov" directly
> as a boolean in the WHERE _expression_: WHERE prov works in
> Access but not with MS SQL.

The problem with short-cutting like this is that a boolean field has 3
values:
1, 0 and NULL

If you want to just get 1 (as being "true") then you would have to to
do:
WHERE prov = 1

And in the opposite, because NULL is a different "state", you can't
treat it like 1 or 0, so you have to do:
WHERE prov is NULL or prov = 0

Or simply:
WHERE ISNull(prov, 0) = 0

If you're too used to using one database's tricks, then you will always
have problems converting to a different engine - you have to remember
that Access is not a REAL database engine either - it is a desktop tool,
so it will have features to make a desktop app helpful (and be
compatible with the other Office apps), but most of these won't be in a
server level database engine (such as SQL Server, Oracle, mySQL,
Protégé, etc.)

If you're converting Access applications to SQL Server, then you'll
probably have a LOT of work ahead of you - there is not simple switch
over
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to