Hi,
Is 22. decimal or not?. If it is a decimal how do i check?
TIA
Decimal Check
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Decimal Check
It depends.pandu80 wrote:Is 22. decimal or not?.
There are no data types in DataStage server edition, so the data type depends on what you're doing with it. The value you cite could be an integer, a decimal, a floating point number or a character string, depending on the context.
Further, the notion of data type doesn't really apply to data; it applies to the columns in which the data are stored.
Certainly you can construct a test that answers the question (does this string of characters contain only an optional sign, zero or more numeric digits, a decimal place designator followed by zero or more numeric digits) if that's your definition of "decimal". But most database would allow you to insert 22 (without the ".") into a column whose data type is "Decimal".
Further, if there are thousands delimiters, what do you want your test to do?
And, finally, your locale may influence what represents a decimal. For example in may European countries "," is used as the decimal place designator (for instance 74,3). Should this satisfy your test?
More thought is required, ne c'est pas? Happy Bastille Day!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.