Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, Hope someone can help. I'

Status
Not open for further replies.

WP

Programmer
Nov 30, 1999
463
CH
Hi,

Hope someone can help.

I'm creating a view :

CREATE OR REPLACE VIEW DB2_FDBTAB_CUR ( NUM_CODE,
ISO_CODE, EURO, DESCRIPTION ) AS select tbcode,tbcomp,tbcomp,tbdes1 from olyftch.fdbtab@esdev01a.db2 where tbid='040'

However, the ISO_CODE is only the first 3 chars of tbcomp. I'd like to only have the first 3.- Left(field,3) but not sure of Oracle syntax.

The EURO indicator is position 57 of tbcomp (tbcomp is 80 char) and again i'd like to just select the substring of tbcomp required.



Bill Paton
william.paton@ubsw.com

Check out
 
substr(tbcomp,1,3) returns first 3 characters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top