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.

asked 21 Mar '12, 15:14

butterflydni's gravatar image

butterflydni
0111
accept rate: 0%

edited 21 Mar '12, 15:52

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050


It looks like a cursor declaration based on a join of three tables on two different databases.

It's not SQL Anywhere code, which is what this forum is all about.

permanent link

answered 21 Mar '12, 15:58

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

edited 21 Mar '12, 15:59

DB2 at a guess

(21 Mar '12, 17:09) Justin Willey
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×90
×78

question asked: 21 Mar '12, 15:14

question was seen: 2,006 times

last updated: 21 Mar '12, 17:09