[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Checking for numeric datatype



Hi,

Try the translate function.....leaving the last argument blank, it will remove 
any character in the 2nd parameter string from the original string.

let $ls_temp = translate($ls_string, '1234567890','')
if length($ls_temp) > 0
    let $as_msg = 'Numbers must be entered for day of month. :: ' || $as_msg
else
    ....

Regards,
Ian
ORIX Australia Corp Ltd




>>> ssambhe@cisco.com 31/08/2006 3:46 pm >>>
Code is fine...but this will cause surely a performance hindrance !!
Any other way for this ? 

-----Original Message-----
From: sqr-users-bounces+ssambhe=cisco.com@sqrug.org 
[mailto:sqr-users-bounces+ssambhe=cisco.com@sqrug.org] On Behalf Of B,
Ravishankar (Cognizant)
Sent: Thursday, August 31, 2006 10:02 AM
To: This list is for discussion about the SQR database reportinglanguage
from Hyperion Solutions.
Subject: RE: [sqr-users] Checking for numeric datatype


Hi,

Try this code snippet for checking occurrence of numeric values in a
variable:

 
While #i < length($Col1)
    add 1 to #i
    Let #out = ascii(substr($Col1,#i,1))
    If not(range(#out,48,57))
       Add 1 to #status
    End-If
End-While

If #status > 0
    Let $NumFlag='F'
Else
    Let $NumFlag='T'
End-If



CHEERS !!!
Ravishankar

"Most people are only alive because it is illegal to shoot them"


-----Original Message-----
From: sqr-users-bounces+ravishankar.b=cognizant.com@sqrug.org 
[mailto:sqr-users-bounces+ravishankar.b=cognizant.com@sqrug.org] On Behalf
Of Vaidyanathan, Ramakrishnan (GE, Corporate,consultant)
Sent: Wednesday, August 30, 2006 11:15 PM
To: sqr-users@sqrug.org 
Subject: [sqr-users] Checking for numeric datatype

Hi,
   Is there any function in sqr to check whether the value retireved from
the database field is a numeric or not..some thing like is numeric..I am
retrieving the database field to a variable and I need to check whether that
field is a numeric or not. Pls help Thanks Ram

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users 

This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly prohibited and may be unlawful.

  Visit us at http://www.cognizant.com 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users 



-- 

This message from ORIX Australia might contain confidential and/or
privileged information. If you are not the intended recipient, any use,
disclosure or copying of this message (or of any attachments to it) is
not authorised.

If you have received this message in error, please notify the sender
immediately and delete the message and any attachments from your
system. Please inform the sender if you do not wish to receive future
communications by email.

ORIX handles personal information according to a Privacy Policy that is
consistent with the National Privacy Principles. Please let us know if
you would like a copy. It is also available at http://www.orix.com.au .



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users