Include Comments in Query/400 Queries
September 20, 2006 Hey, Ted
OK, I’ll bite. In your article Query/400 Handles Zero Dates (Sort Of), from Four Hundred Guru Volume 6, Number 25, you said, “This is one way to include comments in a query.” Does that mean there are other ways I can include comments in queries?
I know of one other way to comment result fields other than the one I used in that example. First, let’s review that method. Here’s the first result field in that article.
Field Expression Column Heading Len Dec SDNOT0 shipdt/(shipdt-0.0000001) 0=Ship date is zero 1 0 1=ship date is not zero
In this example, I used the Column Heading entry fields to explain that SDNOT0 will have one of two values. Zero indicates that the ship date is zero, and one indicates that ship date is not zero.
The other method of which I am aware is to define dummy result fields that you never refer to elsewhere. You can use not only the Column Heading entry fields, but also the Expression entry field, enclosing the comment text in quotation marks.
Field Expression Column Heading Len Dec COMMENT1 'The third character of the item 1=steel, 2=iron number tells which metal the item 3=aluminum is made of' METAL substr(itmno, 3, 1)
You will probably not want to include these comment fields in the “Select and sequence fields” panel.
It’s not elegant, but as a rule, I don’t use elegant and Query/400 in the same sentence.