Data type for decimal values
Hi experts,
kindly help me in sorted this..
in my coding:
ztest is a structure.
I want to ask u that what datatype shud i give to my field so that it can gv me acorrect value after appending.
also i have to sort my data and decimal shud b 2 place only.
kinldy response
data: itab like ztest occurs 10 with header line.
move '0.23566' to itab-value.
append itab.
move '1.98323' to itab-value.
append itab.
move 900 to itab-value.
append itab.
move '100' to itab-value.
append itab.
sort itab by value descending.
loop at itab.
write: / itab-value.
endloop.
thanks n regards
puneet
Hi,
you can declare the value in the following way.
DATA : value type p decimals 2.
Reward points if useful.
Regards
rose
Similar Messages
-
I am making my own database table.which data type shuld I use to display decimal values.I used FLTP but its display is not very clear.
My values are like1234.56
Thanksassign decimal place while creating domine.
as per ur req.....
if it is usefulll.Plz Reward
Regards
Anbu -
Wat should be data type for negative and decimal values (eg: -1.2222)
What should be data type for negative and decimal values (eg: -1.2222)
Hi
U can use the data type DEC while creating the DOMAIN and in the domain u have sign check box at the left corner of the screen, click that check box , u can assign negative values for the field which refers this domain.
REWARD IF HELPFULL
Anees. -
Data type of the value in a string
is it possible to determine what is the data type of the value of my string? for example if the user enters an integer, how do i know its an integer?
if what the user entered is either 1 character,more than
1 characters(a string), a whole number with no
decimail places(an int) or a number with decimal
places(a double).Those aren't mutually exclusive possibilities. If the user enters12345is that supposed to be a string with 5 characters or a whole number?
how do i do that before i actually
come to the Integer.parseInt or double.parsedouble
statement?You don't. You use those statements to determine whether the string input can be interpreted as an integer or as a double. -
How to get the leading zeros for decimal values?
Hi,
How i wil get the leading zeros for decimal values.For CONVERSION_EXIT_ALPHA_INPUT it is not working.Now iam using overlay condition for getting leading zeros.But iam getting the value like 00013.500.But as per my requirement i want to display this value 0000013.5.
my code is
overlay w_MetLife_detail-rdempsalary with '000000000'
data :rdempsalary type char9
Please help me on this.
Regards,
SujanHi
For more info,
The function of the statement UNPACK is based on the fact, that the BCD display of a decimal place corresponds to the second half-byte of code of a digit in the most character representations. This conversion is commonly called "unpacking".
The statement PACK to pack is obsolete and can be replaced by MOVE.
If destination is specified as untyped field symbol or as untyped formal parameter and is not flat and not character-type during execution of the statement, then an untreatable exception occurs in Unicode programs. In non-Unicode programs, an exception occurs only with deep types, whereas flat types are treated as character-type types.
Example
After the assignments,char1 and char2 contain the values "123.456" and "0000123456".
DATA: pack TYPE p LENGTH 8 DECIMALS 3 VALUE '123.456',
char1 TYPE c LENGTH 10,
char2 TYPE c LENGTH 10.
MOVE pack TO char1.
UNPACK pack TO char2.
Regards -
Data Type for Process Flow... PB with Date?
I've got a problem by passing parameters in process flow.
I have a mapping with a parameter DATE_EXEC (data type : DATE) and a default value that is TO_DATE('20/01/2007' , 'dd/mm/yyyy') . My mapping is working good when i launch it.
I have a process flow which contains the mapping. This process has a parameter DATE_EXEC (data type : DATE). I bind the 2 DATE_EXEC. But when i launch my mapping the value is not recognized, I try with :
- TO_DATE('20/01/2007' , 'dd/mm/yyyy')
- 20/01/2007
- 2007.01.20
- 2007-01-20
My question is what are the data type in process flow? They are not ORACLE TYPE.
For example , a parameter in a mapping which is a VARCHAR2 must be input between quotes but if you bind it to a parameter of a process flow which is a STRING (not ORACLE Data type) , you must input it without quotes?
Anybody has some rules about that?
I apologize for my english, i'm a french people.Here is some information on the literal quote or not quote query and what I think you need to do at the end, hope it helps. Not exactly intuitive...since the flow designer (you) have to know what is a PLSQL object and what is not.
1. Literal = FALSE
When Literal = FALSE is set then the value entered must be a valid PL/SQL expression which is evaluated at the Control Center e.g.
'Hello World!'
22 / 7
2. Literal = TRUE
When Literal = TRUE then the value is dependent on the the type of Activity. If the activity is a PL/SQL object i.e. Mapping or Transformation, then the value is PL/SQL snippet. The critical difference here is that the value is macro substituted into the call for the object. The format of the value is identical to that entered as default value in the Mapping editor. e.g.
'Hello World!'
sysdate()
If the activity type is not a PL/SQL object then the value is language independent. e.g.
Hello World
3.1427571
What you should try......
Check the map activity parameter in your process flow to see if literal is false (an expression), set it to false and then try using your TO_DATE('20/01/2007' , 'dd/mm/yyyy') expression, deploy your flow and execute. Alternatively the user guide defines the DATE type for flow with the format YYYY-MM-DD so you can have the parameter value as '2007-01-20' use literal equal to true and remember and quote your value.
Cheers
David -
T-SQL and CLR types for return value do not match
Hi I am trying to create a CLR function to call a webservice, the CLR function return data type is double, whether I try
to create this as a table valued funcion or a scalar to return a distance travelled value I am receiving the error below. I've tried changing data types around in the CLR side and the SQL side but keep receiving the same error message, any help would be appreciated,
Thank you,
[Microsoft.SqlServer.Server.SqlFunction(Name = "DistanceCalc")]
public static Double DistanceCalc(Double SrcLat, Double SrcLong,
Double DestLat, Double DestLong)
MileageWS ws = new MileageWS();
ws.Url = "http://test.isp.ca/Distance.asmx";
int intUom = 0; // 0 = Mile, 1 = KM
RouteType RouteMethod = RouteType.Practical;
Requester RequestedFrom = Requester.LinkRoute;
Double distance;
distance = ws.GetDistanceInfoForLonLat(SrcLat, SrcLong, DestLat, DestLong, intUom, RouteMethod, RequestedFrom);
return distance;
CREATE FUNCTION DistanceCalc
@SrcLat as float, @SrcLong as float,
@DestLat as float, @DestLong as float
RETURNS TABLE (Distance float)
External NAME CLRfunctions.RIFunctions.DistanceCalc
GO
Error received when try to Create function ...
1, Level 16, State 2, Procedure pcMiler, Line 6
CREATE FUNCTION for "pcMiler" failed because T-SQL and CLR types for return value do not match.You defined at table-valued CLR function, but I think you meant to define a scalar CLR function. That might be the cause of the error.
RETURNS TABLE (Distance float)
should be
RETURNS (Distance float) -
How to change data type for a field?
Hi Experts,
I have one std screen having one field having numeric type. So it will accept only numeric value. Remember I am using standard transaction.
Now my user wants to enter the special character like + or - in that field(having data type numeric).
How i can change the data type for the particular field so that it will also accept + or -?
Plz reply me as earliest as possible.
Thanks in advance.Hi salil ,
u have to change / create Domain of that Data Element.
but u have to check the Implications. i have done the same thing , but that one is Customer defined one , i got nearly 20 short dumps while doing the TP.
regards
Prabhu -
Data Type for a Longitude/Latitude Column in an Oracle dB Table?
Greetings All,
What is the recommended data type for a Longitude(Lon) or Latitude(Lat) Column of an Oracle dB Table? I am creating a signs inventory table in our Oracle database to be used as a data warehouse for our signs inventory. The Lon and Lat fields along with some other data will be populated from a MS access file exported from our Geodatabase. Currently the data type for the Lon and Lat fields of the MS access file is defined as "Double". A couple of Examples of the Lon and Lat data are as follows:
Lat Lon
59.4564555909 -135.3133542922
64.841125 -148.01808
...What data type should these two columns be defined in the new Oracle database table??? Should the data type be defined as FLOAT(126), NUMBER(10, 6), or else? Any suggestions/help on this would be greatly appreciated.
If the data type is defined as NUMBER(10,6), the first example of Lon "-135.3133542922" will be truncated to "-135.313354" or would I receive an error while trying to import the data from an access file to the Oracle dB?
Thanks in advance for any/all the help.Orchid,
Is SDO_GEOMETRY available in Oracle 10g?Yup. I'm still on 10g as well; there's no shame in that.
How do I format my lat/long's into WKT and use the SDO_GEOMETRY constructor?The March 16th example shows the steps, but I take it you're trying to get your data from MS Access into Oracle. Is that right? If so, consider these options:
OPTION 1, When you have < 50k records
Simply write a query that returns INSERT statements that you can run against Oracle.
For example, let's say you have a table in MS Access defined as msaCoords (ID, LongX, LatY).
Let's say, your destination table in Oracle is named oraCoords(ID NUMBER, Geometry MDSYS.SDO_GEOMETRY). Then,
SELECT "INSERT INTO oraCoords (ID, Geometry) VALUES (" & ID & ", SDO_GEOMETRY('POINT (" & LongX & "," & LatY & "'), 8307);" FROM msaCoords;
-- "MS-ACCESS QUERY RESULTS"
INSERT INTO oraCoord (ID, Geometry) VALUES (1, SDO_GEOMETRY('POINT (-135.3133542922,59.4564555909'), 8307);
INSERT INTO oraCoord (ID, Geometry) VALUES (2, SDO_GEOMETRY('POINT (-148.01808,64.841125'), 8307);Save those MS-ACCESS QUERY RESULTS to a text-file (D:\MyPts.sql). Launch SqlPlus and type @D:\MyPts.sql
Once it's done, type Commit into SqlPlus and you're done.
OPTION 2, when you have > 50k records
Use SqlLoader. There's an example posted { here | http://forums.oracle.com/forums/thread.jspa?messageID=9412123� }
Cheers,
Noel -
Data Types for RadioButtons and PushButtons
Is there a data type for representing radioButtons and pushButtons in the Oracle tables? If not, what is the alternative to using these controls?
nullHello,
The data type of your field is smallmoney or you want to convert a int or varchar value to smallmoney?
Hugs!
Bruno Destro
Dicas de programação em .net, C# e SQL - http://smcode.com.br/blog.aspx -
Query regarding the data type for fetcing records from multiple ODS tables
hey guys;
i have a query regarding the data type for fetcing records from multiple ODS tables.
if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
can any one help with some suggestion.Hi Mudit,
One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
AS is used to rename the column name when data is being selected from your DB.
So, the query Select ename as empname from emptable will return the data with column name as empname.
Regards,
Bhavesh -
Labview How to specify 1d array of clusters as data types for variant to data
Hi, I'm new to labview. Can anyone tell me how to specify 1d array of clusters as data types for variant to data?
First of all, you should be sure that there is such a data type within the variant; otherwise, you will run into errors.
I recommend you to create the cluster and create a type definition from it. Then drop an array shell from the array palette and drop the cluster type into that array.
Connect that constant to the data type input of the Variant To Data function.
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
Default date type for IT0041 in action
Hi,
I configure feature DATAR to set 01 as default date type for IT0041, but when I do hiring action, default date type will be 01,02,12.
Don't know where to change the default.Hi,
Please verify if there is any dynamic action in table V_T588Z set-up for same which may cause override over default.
Also, verify if your DATAR feature is set up correctly for relevant country grouping and activated.
Thanks,
Ameet -
How create data type for coulmn name having special characters in IR
hi ,
any idea how to create how to do create data type for coulmn name having special charactersHi Amit,
Can you ellaborate ?
Actually if you are reading a file(or anything else) which contains special characters, the data type can be created as done for other interfaces. But it is in the adapters that we actually take care of handling these special characters.
ShabZ -
Leading Zeros for Decimal values
Hi,
In my requirement i need to add leading zeros for Decimal values.
For Example.
If the value is = 0.00 then my Target value should be = 000000000000.00
Regards,
Anil.Hi Anil,
You have to use conversion exit ,
Kindly go through this link below:
Re: Conversion exit: numbers in database, two decimals on screen
Hope it helps
Regards
Mansi
Maybe you are looking for
-
Upgrading internal HDD on Macbook Pro 13(Unibody)-Mid 2009
Hi All, I have a 160GB internal hdd on my MBP 13 which i am finding to be pretty low on space. So I am planning to upgrade the internal HDD. I did a lot of reading on the web and looks like there are 3 contenders: 1. WD scorpio blue 500/640/750 GB, 5
-
Backing up/archiving songs/loops on an external drive rop
I have some questions about backing up songs. I want to verify that this is correct. I want to make sure that I get everything backed up since my home computer crashed and you never know when something could happen to my work computer. I know in orde
-
Linux desktop enviroments with different way of doing things?
I was just thinking that big DE:s like KDE or GNOME have basically same way of doing things. You have start button, quicklaunch icons, taskbar, clock etc in same panel, Control Pan.. err Control Center, Same OK Cancel dialogs etc. These things remind
-
MS Word -- Formatting Palette "genies" to where I can't get it!
I've been using the formatting palette...I've had no problems clicking it on and off...until I turned my computer on and their was no palette. Clicking the icon "genied" it off the screen. Tile-ing the applications does not reveal it either. Changing
-
Firefox was working fine for me until the latest update (6.0.2) Now in my online teaching environment pages won't open and especially media-rich pages or videos. In Dropbox.com I can't get some of the site pages to open. In