>  Docs Center  >  Libraries  >  ASTROLIB  >  DBGET
Libraries

DBGET

DBGET

Name


      DBGET

Purpose


      Find entry numbers which contain specified values of a given item.

Explanation


      DBGET() is useful as an alternative to DBFIND() when the desired
      search values are not easily expressed as a string.

Calling Sequence


      list = dbget( item, values, [ listin ], /SILENT, /FULLSTRING )

Inputs


      item - Item name or number
      values - scalar or vector containing item values to search for.

Optional Inputs


      listin - list of entries to be searched. If not supplied, or
              set to -1, then all entries are searched

Output


      list - vector giving the entry number of entries containing desired
              item values. The number of elements in LIST may be different
              from that of VALUE, since a value might be located zero, once,
              or many times in the database. Use the function DBMATCH if a
              one to one correspondence is desired between VALUES and LIST.

Optional Input Keywords


      /SILENT - If this keyword is set, then DBGET will not display
              the number of entries found
      /FULLSTRING - By default, one has a match if a search string is
              included in any part of a database value (substring match).
              But if /FULLSTRING is set, then all characters in the database
              value must match the search string (excluding leading and
              trailing blanks). Both types of string searches are case
              insensitive.

Optional Output Keyword


      COUNT - Integer scalar giving the number of valid matches

Restrictions


      When linked databases are opened together, DBGET can only be used to
      search on items in the primary database.

Example


      Get info on selected HD stars in Bright Star catalogue
      IDL> dbopen, 'YALE_BS'
      IDL> hdno = [1141,2363,3574,4128,6192,6314,6668] ;Desired HD numbers
      IDL> list = dbget( 'HD', hdno ) ;Get corresponding entry numbers

System Variables


      The obsolete system variable !ERR is set to number of entries found

Revision History


      Written, W. Landsman STX February, 1989
      William Thompson, GSFC, 14 March 1995 Added keyword FULLSTRING
      Converted to IDL V5.0 W. Landsman September 1997
      Added COUNT keyword, deprecate !ERR W. Landsman March 2000
      Fix bug introduced March 2000 W. Landsman November 2000
      Fix possible bug when sublist supplied W. Landsman August 2008



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us