I had two attempts at posting this yesterday. Neither seems to have made it
to the list. A last try.....


This is not a bug.

When a field with a conversion is used in a WITH or WHEN clause to compare
it with a constant, the query processor applies the conversion to the
constant "in reverse" to form the internal value. The comparison is then
done on this internal form value. Think about it for a while and you will
find many places where no other technique would work.

So, looking at your example...
   LIST FILE WHEN MONTH = "12"

The definition of date conversion states that a month number on its own is
converted to the first of the month in the current year. So this is actually
testing for the field containing the internal form of 1 December 2006.

Perhaps the manuals should draw this out more clearly but any conversion
code used in a WITH/WHEN clause in this way must be "reversible".

The solution is to create an I-type that reads
   OCONV(DATE,'DM')
(assuming DATE as the name of the raw data field) and then test this in the
query.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to