Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] convert alpha to integer
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] convert alpha to integer
 Login/Join
 
Gold member
posted
I seem to have a mental block but can someone assist me on converting an Alpha field into an integer?

i extract data from a source and it can only extract as alpha, i have to remove a character which i did and i'm at the point where i would ned to convert the field to an integer but can't seem to do this. I'm trying to create a define field in the synonym

This message has been edited. Last edited by: <Kathryn Henning>,


WebFocus 8.02, SQL Server 2008r2
 
Posts: 51 | Registered: November 30, 2012Reply With QuoteReport This Post
Platinum Member
posted Hide Post
DEFINE FILE EMPLOYEE
EMPID/I9 = EDIT(EMP_ID);
END
TABLE FILE EMPLOYEE
PRINT EMP_ID AS 'A9 FORMAT'
EMPID AS 'I9 FORMAT'
BY LAST_NAME AS 'LAST NAME'
END


WF 8 version 8.2.01M. Windows.
In focus since 1990.
 
Posts: 188 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
You can add a DEFINE to the synonym.
DEFINE EMPID/I9 = EDIT(EMP_ID); ,$


WF 8 version 8.2.01M. Windows.
In focus since 1990.
 
Posts: 188 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
All of these things are documented in the WebFOCUS Keysheet Release 8.0.2. It is such a great quick reference guide --- You will save so much time! Why beat your head against the wall, when you can have the answer right at your fingertips. You really should check it out.

Vivian
www.aviter.com


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
CS

Look for the SQL prefix to include SQL functions in synonyms. Works like a dream in passing to RDBMS.

Something like -
DEFINE MYINT/I9 = SQL.SUBSTR(column, 2, 9); $

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5608 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Gold member
posted Hide Post
Hello Spence,Vivian,Tony,

Thank you for the reply these will really help me and i will certainly look more into the documentation.

Thanks again Smiler


WebFocus 8.02, SQL Server 2008r2
 
Posts: 51 | Registered: November 30, 2012Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] convert alpha to integer

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.