Not sure if this is the right forurm for this but i'm tryign to figure out what the person before me was trying to do with the following chunck of code:
DECLARE C1 CURSOR WITH RETURN FOR SELECT DISTINCT CLIENTVIS . ORMASTA . ORDERNO , ORDERCODE , CLIENTVIS . ORMASTA . CUSTCODE , NAME , CITY , STATE , OPERDIVID , MRKTUNITID , ORDERDESC , ORDTYPID , SCHEDSHIP , ACTUALSHIP , HLDCANFLAG , SHORTDESC , PARTNO , REFNO FROM CLIENTVIS . ORMASTA LEFT OUTER JOIN CLIENTVIS . ORTYPE ON ( ORDTYPID = ORDTYPEID ) LEFT OUTER JOIN QS36F . ORMASRFX ON ( CLIENTVIS . ORMASTA . ORDERNO = QS36F . ORMASRFX . ORDERNO ) WHERE CLIENTVIS . ORMASTA . CUSTCODE LIKE CCD AND ORDTYPID LIKE TP AND PROJECTID LIKE PROJECT AND TRANSLATE ( ORDERCODE ) LIKE ORDCODE AND TRANSLATE ( NAME ) LIKE NM AND TRANSLATE ( CITY ) LIKE CTY AND STATE LIKE ST AND TRANSLATE ( PURCHORDER ) LIKE PO AND TRANSLATE ( ORDERDESC ) LIKE ORDDESC AND TRANSLATE ( COUNTRY ) LIKE CTRY AND TRANSLATE ( PARTNO ) LIKE PNO AND ACTUALSHIP > BEGACTSHP AND ACTUALSHIP < ENDACTSHP AND HLDCANFLAG IN ( HOLDFLAG , CANCELFLAG , '' ) AND PRODCOMPL > BEGCOMP AND PRODCOMPL < ENDCOMP ;
a little back ground this is called from a java program and backends onto a i5. the names in the where clause that are in () are the database field names and other part are names after the like are names defined in the SQL. this is just a chunck if its more helpful and can give it all.