On Thu, Sep 11, 2003 at 10:49:37AM -0500, Ed Summers wrote: > On Thu, Sep 11, 2003 at 08:40:48AM -0500, Chuck Bearden wrote: > > I hope this helps. > > This helps for the order of the fields, but from looking at his > program it looks like the more pernicious problem is the order of the > subfields within each field!
Ah, I overlooked that crucial point. My guess is that the 'marc_subfield_table' from which he is selecting also contains a column with an int reflecting the ordinal of the subfield within the field. If so, adding an 'ORDER BY' clause to the SELECT statement would extract the subfields in the order specified in the database (ostensibly the order given by the cataloger or by the MARC record originally loaded). FWIW, I don't know of a generalized set of rules for subfield ordering. For USMARC-encoded AACR2 records, I suspect that the assumption is that the cataloger will order them according to AACR2 order. While general patterns could be specified for many fields, there would be many exceptional cases. And of course formats other than AACR2 can be encoded in MARC. Chuck