HP3000-L Archives

April 1998, 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:
"Gary L. Biggs" <[log in to unmask]>
Reply To:
Gary L. Biggs
Date:
Sat, 11 Apr 1998 16:56:02 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (82 lines)
Kevin:

You can create a view on top of an IMAGE table to accomplish remarkable data
transformations. Here is one that replicates the complex structure of
a Powerhouse data dictionary that has multiple redefines on items. By doing
this
type of work, you can directly migrate QUIZ reports to SQL with only modest
effort. I (almost) never split anything and use LOTS of indices in my SQL
work. By using the Structural Views, I can insure that my indices and sub
items are always available when I need them.

One caveat, ALLBASE balks at more than 32 views or tables in an SQL select
statement. You can get into trouble with this technique because each view
takes up an entry in addition to its underlying table. This reduces the
maximum number of tables you can join in a single select. Still, it is a
VERY powerful technique. (Patent Pending ..... ;-) )

create view Desktop.Free_Seats
            (BASS_KEY,
             BASS_STATUS,
             EVENT,
             FLOOR,
             HOLD_EXP_DATE,
             HOLD_EXP_TIME,
             HOUSE,
             LOCATION_KEY,
             MAINT_DATE,
             MAINT_DATE_IDX,
             ORIGINAL_OWNER,
             PATRON_NUMBER,
             PERFORM_KEY,
             PERFORM_STATUS,
             PRICE_CLASS,
             PRICE_CLASS_CHAR,
             PRIORITY,
             PRODUCTION,
             ROW,
             SEASON,
             SEAT,
             SECTION,
             SERIES,
             STATUS,
             TICKET_TYPE,
             TICK_DON_FLAG,
             TRANSFER_COUNT) as
      select BASS_KEY,
             BASS_KEY || substring(STATUS_TYPE,1,1),
             substring(BASS_KEY,3,4),
             substring(LOCATION_KEY,3,2),
             HOLD_EXP_DATE,
             HOLD_EXP_TIME,
             substring(LOCATION_KEY,1,2),
             LOCATION_KEY,
             cast(substring(cast(MAINT_DATE+100000000,CHAR(9)),4,6),
                  date,'YYMMDD'),
             MAINT_DATE,
             ORIGINAL_OWNER,
             PATRON_NUMBER,
             substring(BASS_KEY,1,8),
             substring(BASS_KEY,1,8) || substring(STATUS_TYPE,1,1),
             cast(substring(BASS_KEY,9,2),decimal(2,0)),
             substring(BASS_KEY,9,2),
             PRIORITY_K,
             substring(BASS_KEY,1,6),
             substring(LOCATION_KEY,8,2),
             SEASON,
             substring(LOCATION_KEY,10,3),
             substring(LOCATION_KEY,5,3),
             substring(BASS_KEY,7,2),
             substring(STATUS_TYPE,1,1),
             substring(STATUS_TYPE,2,1),
             substring(DON_FLAG_XFER,1,1),
             substring(DON_FLAG_XFER,2,1)
       from PACT.FREE_SEATS;

Gary L. Biggs, N5TTO
[log in to unmask]
Interex SIG Allbase Chair

"Abandon all hope, Ye who Inter(net) here" --
Dante, over the portal(router) to Hell

ATOM RSS1 RSS2