戻る

種の学名で部分一致探索をするプロシジャ

0001: CREATE PROCEDURE PS_NLIKE_SGFO(
0002:     SPECIESNPART NCHAR VARYING(40)
0003: )
0004: RETURNS(
0005:     SEQNO       INTEGER,
0006:     ORDERNAME   NCHAR VARYING(24),
0007:     ORDERJPN    VARCHAR      (12),
0008:     FAMILYNAME  NCHAR VARYING(24),
0009:     FAMILYJPN   VARCHAR      (20),
0010:     GENUSNAME   NCHAR VARYING(24),
0011:     GENUSJPN    VARCHAR      (12),
0012:     SPECIESNAME NCHAR VARYING(40),
0013:     SPECIESJPN  VARCHAR      (24),
0014:     SPECIESENG  NCHAR VARYING(40)
0015: )
0016: AS
0017: DECLARE VARIABLE SGENUSNAME  NCHAR VARYING(24);
0018: DECLARE VARIABLE GFAMILYNAME NCHAR VARYING(24);
0019: DECLARE VARIABLE FORDERNAME  NCHAR VARYING(24);
0020: BEGIN
0021:     GENUSNAME='';
0022:     FAMILYNAME='';
0023:     ORDERNAME=''; 
0024:     FOR
0025:         SELECT  SEQNO, GENUSNAME, SPECIESNAME, SPECIESJPN, SPECIESENG
0026:           FROM SPECIES
0027:           WHERE UPPER(SPECIESNAME) LIKE :SPECIESNPART AND SEQNO<9947
0028:           INTO :SEQNO,:SGENUSNAME,:SPECIESNAME,:SPECIESJPN,:SPECIESENG
0029:     DO
0030:     BEGIN
0031:         IF (SGENUSNAME<>GENUSNAME) THEN
0032:         BEGIN
0033:             SELECT GENUSNAME, FAMILYNAME, GENUSJPN
0034:               FROM GENUS
0035:               WHERE GENUSNAME=:SGENUSNAME
0036:               INTO :GENUSNAME,:GFAMILYNAME,:GENUSJPN;
0037:             IF  (GFAMILYNAME<>FAMILYNAME) THEN
0038:             BEGIN
0039:                 SELECT ORDERNAME, FAMILYNAME, FAMILYJPN
0040:                   FROM FAMILY
0041:                   WHERE FAMILYNAME=:GFAMILYNAME
0042:                   INTO :FORDERNAME, :FAMILYNAME, :FAMILYJPN;
0043:                   IF  (FORDERNAME<>ORDERNAME) THEN
0044:                     SELECT ORDERNAME,ORDERJPN
0045:                       FROM ORDERTAB
0046:                       WHERE ORDERNAME=:FORDERNAME
0047:                       INTO :ORDERNAME,:ORDERJPN;
0048:             END
0049:         END
0050:         SUSPEND;
0051:     END
0052: END;

この HTML を検査する。( XHTML 1.0 Strict で書かれています )
Another HTML Lint Gateway ( Mirrored by htmllint.oosato.org )