HP3000-L Archives

March 2000, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tim Ericson <[log in to unmask]>
Reply To:
Tim Ericson <[log in to unmask]>
Date:
Mon, 13 Mar 2000 11:26:38 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (85 lines)
Hi Everyone,

I'm catching up here...

Larry Barnes asked:
> How do I search for all records with UPSRED and a numeric string
> in 23-26  in field 1 and 10n in bytes 1-3 of field number 2?
> Everything I've tried returns an error.

And I answered:
>> You could try:
>>
>> F FIELD1 IB "UPSRED                0000",&
>> "UPSRED                9999" AND FIELD2 IB "100 ","109 "
>>
>> IB is 'In Between', and inclusive (the arguments are returned,
>> too)


Then Roy Brown pointed out:
> But the IB would be doing a character match.
>
> So wouldn't this return records of the form (say)
>
>   "UPSRED                0XXX" with "100X"
>
> if there were any?


Oops!  He's absolutely right!

A quick check of the Query manual explains the right way (I hope!)
to do this:

  A pattern consists of a series of the following special
  characters that indicate the type of data that can be
  entered in that position:

     a    upper or lowercase alphabetic character (A-Z, a-z)
     u    uppercase alphabetic character (A-Z)
     l    lowercase alphabetic character (a-z)
     b    blank
     d    digit (0-9)
     ?    any character

  The beginning of the pattern is defined by a beginning
  quotation mark and the end is defined by an ending
  quotation mark.  QUERY does not read spaces as blanks;
  therefore, you can leave spaces inside a pattern to
  allow for better readability.

  The matching pattern can include specific characters in
  addition to the types listed above.  For example:

     MATCHING "Aaa-dddd"

  The pattern above means that the value must start with
  the letter "A" followed by any two upper or lowercase
  letters, followed by a hyphen and any four digits.  For
  example, the values "Acs-1234" and "AAA-9999" are
  acceptable, but the values "Bcs-1223" and "A12-345" are
  not acceptable.

So, Larry's search *should* work like this:

  F FIELD1 M "UPSREDbbbbbbbbbbbbbbbbdddd" AND FIELD2 M "10db"

Or (if I'm confused about "QUERY does not read spaces as blanks")

  F FIELD1 M "UPSRED                dddd" AND FIELD2 M "10d "

HTH!

 +-------------------------------------------------------------------+
  My mind is my own, as are my ideas and opinions.
  My heart, body, and soul, however, all belong to others.       Tim.
 +-------------------------------------------------------------------+
  Tim Ericson            tericson      DenKor Dental Management Corp.
  Sr. Systems Analyst     at denkor    503-526-4440 (my direct number)
    (& Systems Manager)     dot com         http://www.denkor.com
  Programming HP3000s since 1983!      Quality dental care since 1970!
 +-------------------------------------------------------------------+
  UDCs and Command Files:  http://www.denkor.com/hp3000/command_files
 +-------------------------------------------------------------------+

ATOM RSS1 RSS2