Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need help figuring out code

Author  Topic 

butterflydni
Starting Member

2 Posts

Posted - 2012-03-21 : 16:31:17
Hopefully I have the right forum.

okay i'm new to a job that uses in house application coded in java the java codes calls SQL procedures developed using iseries navigator that backends to an i5 that houses the databases. My issues is with the following chuck of code. I needed to fix it but when I recreate the procedure it doesn't like the translate code so can someone please tell me what they were trying to do.

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 ;
let me know if you need more information or the whole code.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-03-21 : 16:54:38
It doesn't sound like you are using Microsoft SQL Server, so I would suggest posting your question on a site that specializes in your technology. Our specialty here is MSSQL.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-21 : 17:05:33
Is this DB2?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

butterflydni
Starting Member

2 Posts

Posted - 2012-03-21 : 17:16:42
yes it is DB2
Go to Top of Page
   

- Advertisement -