[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
- Subject: RE: [sqr-users] Checking for numeric datatype
- From: "B, Ravishankar \(Cognizant\)" <Ravishankar.B@cognizant.com>
- Date: Thu, 31 Aug 2006 18:50:20 +0530
- Delivery-date: Thu, 31 Aug 2006 09:26:37 -0400
- In-reply-to: <13DE72304C334648937068342CF3B5510483637E@USMSXT106.mwd.h2o>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcbMXA188dHhZ0HrRQ+xkIaSM0A1FwAWX6EAAALFaWAAD5WOsAAAOBaQ
- Thread-topic: [sqr-users] Checking for numeric datatype
Then, we can check for decimals as well as negative values too as:
Let $Temp = translate($Col1, '0123456789', '')
If $Temp = '' or $Temp = '-' or $Temp = '.'
Let $NumFlag='T'
Else
Let $NumFlag='F'
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 Lynds,Rick
Sent: Thursday, August 31, 2006 6:43 PM
To: This list is for discussion about the SQR database reportinglanguage
fromHyperion Solutions.
Subject: RE: [sqr-users] Checking for numeric datatype
Assuming that you do not have decimal or negative numbers:
Let $Temp = translate($Col1, '0123456789', '')
If $Temp = ''
Let $NumFlag='T'
Else
Let $NumFlag='F'
End-If
-----Original Message-----
From: sqr-users-bounces+rlynds=mwdh2o.com@sqrug.org
[mailto:sqr-users-bounces+rlynds=mwdh2o.com@sqrug.org] On Behalf Of
Sanjay Sambhe
Sent: Wednesday, August 30, 2006 10:46 PM
To: 'This list is for discussion about the SQR database reporting
languagefrom Hyperion Solutions.'
Subject: RE: [sqr-users] Checking for numeric datatype
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
_______________________________________________
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