OK...I'm sure this is a very easy thing to do but I have no clue...I have a field that has 2 and 4 numbers in it. I need to trim it to only the 2 first numbers. In otherwords, I need to drop the last 2 numbers even though some only have 2 numbers in it in which case I don't want to do anything to those.
Thank you, Ana
WEBFOCUS 7.6.4 Server: WINXP
December 13, 2007, 02:50 PM
Francis Mariani
If it's a left-justified alpha field, you can do the following:
Thanks Francis..That did it!!! BUT I need it to be a define now that i think of it because once I do this I need to exclude all that equal 50. :-( The compute did strip it down to 2 but now I can't use it in my where clause.This message has been edited. Last edited by: Latigresa,
WEBFOCUS 7.6.4 Server: WINXP
December 13, 2007, 03:23 PM
Frans
You can also use these COMPUTE's in a define, but keep in mind that this will only cause effect on record level while COMPUTE works on aggregated data.
Do you only use this for your where statement? If so, post you're WHERE statement here.
I would us EDIT over SUBSTR in most cases. EDIT is an Internal function built into WebFOCUS. SUBSTR is an External Function stored in an external library that must be accessed. The only time I use SUBSTR is if the string I want is very long.
ttfn, kp
Access to most releases from R52x, on multiple platforms.
December 14, 2007, 02:42 AM
Tony A
Bucket of cold water for Francis!
December 14, 2007, 09:34 AM
Francis Mariani
Tony, good morning!
December 14, 2007, 02:28 PM
ira
My preference is GinnyJakes for the sake of easier to maintain. Although the other recommendations are equally as nice. Guess Latigresa is roaring now
Sorry...I just got logged in again and read all the messages...Not dangerous at all..lol... ...and YES I was ROARING and didn't want to stop till I got done with all of it...I'm done now for the most part...
THANKS to all of you that helped me out!!!
WEBFOCUS 7.6.4 Server: WINXP
December 17, 2007, 01:59 PM
Francis Mariani
I was asking if you were dangerous because "Removing digits" sounded like you wanted to bite somebody's fingers off
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 17, 2007, 04:16 PM
Latigresa
Well usually by the time I place a question on here it is because I am extremely frustrated from not being able to get it to work on my own and that's probably why I use some of the words I do cause I am thinking bad thoughts. but tryingto place a question on here without letting everyone know at the same time. Hahaha...