How to calculate the number of bytes

There is a general algorithm that calculates the total number of bytes in a pl/sql record?

And dates may take up to 7 or 8 bytes (for data) with the data if they are a column on a table or not in function (this is to with internal C code date types)...

SQL> select dt, dump(dt) from xx;

DT
--------------------
DUMP(DT)
----------------------------------------------
18-FEB-2011 15:00:35
Typ=12 Len=7: 120,111,2,18,16,1,36

SQL> select sysdate, dump(sysdate) from dual;

SYSDATE
--------------------
DUMP(SYSDATE)
----------------------------------------------
18-FEB-2011 15:01:04
Typ=13 Len=8: 219,7,2,18,15,1,4,0

SQL>

Tags: Database

Similar Questions

  • How to calculate the number of days/weeks/months between 2 dates?

    Hello

    I would like to know how to calculate the number of days/weeks/months between 2 dates in OBIEE 11 g, for example, I have 26/05/2013 and 19/05/2013, then I want to get 7 days.

    Thank you!
    Jamie

    Hi Jamie,

    Through this links...

    http://www.bravesoft.com/blog/?p=682
    http://twobiee.blogspot.in/2012/01/working-with-date-differences.html

    Mark as correct it allows u...
    Thank you...

  • How to calculate the number of Out_flags for the PIPL?

    Hey everybody!

    I'm kinda new to After Effects of programming, so I hope I'm not asking an obvious question.

    I searched the web and this forum but just could not find a solution to this problem.

    Compilation of my plugin works fine, but as soon as I select it from the menu effects I am presented with an incompatibility error.

    My question (already in the title): how to calculate the correct number for the global_out_flags pipl?

    Thanks in advance,

    Markus

    If you want the easiest option, just start with the debugger and to break in the General preferences where is defined, or, if you find amusement in the bit and other Boolean arithmetic shift, please do not hesitate to look at the macro

  • How to calculate the number of Avg based on month

    Hi all

    I want to calculate Avg based on averages of the month

    Ex: i have made Total column
    current month like July Thn avg = total/7.
    then even report working in October than avg time = total/10.

    Any help.

    Thank you

    You must specify a digital for parameter 2. The Substring function takes the source from character string parameters and the length of the unit. In my example it will take the value of the variable current_month and returns the characters of the 8th position for 2 characters (so character 8 and 9). For example, instead of 'Time' happening. "" Month "you must pass the literal number 8. So I think the actual code you need is:

    SELECT "Applications and financial accounts. "" Value "/ CAST (SUBSTRING (VALUEOF ("CURRENT_MONTH") OF 8 TO 2) as INT)"financial accounts and Applications.

    NB I'm assuming that the value that you want to divide by the number of current month is called "Applications and financial accounts. "" Value ", please change it's column that you never use.

    Please mark it as useful to the answer

  • How to calculate the number of days between dates

    How can I determine the number of days between 2 dates? Say today and 10/07/46

    Thanks Bob

    You could do it like this:

    Photoperiod var = 1000 * 60 * 60 24; number of ms in a day

    var today: Date = new Date();

    var every time that: Date = new Date (1946,6,10);

    var diff = Math.floor((today.getTime()-whenever.getTime())/dayLength);

    trace (diff)

  • How to calculate the % number in OBIEE 10 g

    Hello

    I want to display like this

    CAT files % count the number of records
    A--------------17------------------------------12.9%
    D--------------22------------------------------16.7%
    R--------------91------------------------------68.9%
    c----------------2--------------------------------1.5%
    Grant-Total-132---58.7%


    Math here:-17/132 * 100 = 12.9%
    / 132 * 100 = 16.7%

    Thank you
    Mohan

    Hi, you can get the percentage of the total by using pivot. Duplicate the column number criteria, then go to the view of Pivot. Click on the measure and choose view data-> percent of-> column. This will give you the percentage based on the total of the column

  • How read information calculate the number of bytes in a megabyte?

    I was under the impression that 1 MB = 1024 KB = 1048676 bytes, but when I use Get Info to check the video file size I see numbers like "473,9 MB on disk (473,910,856 bytes).  Get Info uses a different method, where 1 MB = 1000000 bytes?

    The prefix mega (decimal) was always 1000 x 1000, although when memory sizes were still quite small it was also used as a binary prefix.  The prefix (binary) mebi (1024 x 1024) has been around for awhile and is used more often these days, because there may be a significant difference in the review of larger sizes of memory - see http://physics.nist.gov/cuu/Units/binary.html.  The window read the information shows the size in megabytes, since that's what most hard disk manufacturers use.

  • [Help] How to calculate the number in the same columns

    Hi all

    I have a dynamic repeating table, which displays data in the comic book,

    a watch columns numbers lik 20,15,50,50 in each row.

    I want to calculate these numbers and enter total in the total box.

    You will need to perform the calculation within the region of repetition like this:

    ip name line switch mac phone details month value Collected credit p
    Total
  • How to calculate the size of HFM Cube in SQL Server 2005

    Hello

    How to calculate the size of the HFM Cube in SQL Server2005

    Under application used to Oracle. So what's application to SQL Server?

    ***********************************************************************************************************
    SQL > select sum(bytes/1024/1024) from dba_segments where nom_segment like 'FINANCIAL_ %' and owner = 'HFM;
    SUM(BYTES/1024/1024)

    SQL > select sum(bytes/1024/1024) from dba_segments where nom_segment like FINANCIAL% HSV' and owner = 'HFM;

    SUM(BYTES/1024/1024)
    **********************************************************************************************************

    Concerning
    Smilee

    What is your goal? The subcube in HFM is a concept that applies to application layer - not so much to the database layer. The size of the subcube is the unique number of sheets (data values for January - December inclusive, for example) for the given entity, a triplet of currency or node Parent.Child. Should be considered for accounts of parent and customs that do not exist in the database, but are calculated in the RAM of the application layer.

    So if your goal is to find the largest subcubes, you could do this by querying the database and by counting the number of records per entity value (tables DCE) or combination of entity parent.child (tables of the DCN). I am not versed in SQL, but I think the script below you would just the size of the pattern and not the sizes of subcube.

    See Accelatis.com for a third party software product that can do it for you. The function is called the subcube Analyzer and was written by the same team that wrote HFM, then they should know how :-)

    -chris

  • How to calculate the hours between two dates by the numbers

    If I update 09:00 start time 17:00 end time of shift in C3 and B3, how to use a D3 formula to calculate the number of hours between the two?  Then I can just copy down the lines for nth years...

    It is a spreadsheet of the part-time staff payroll.

    I'm sure that a lot of people out there have done that.

    Help, please.

    Thank you.

    Eddie

    What program of worksheet that you are using? Since you have a newer iMac running El Capitan, I can safely assume that you use NOT AppleWorks, which is a Power PC application that can run on any OS newer than the snow leopard, OS X 10.6.8.

    If you use numbers, try to repost your question in numbers for Mac forum. If you use Microsoft Excel, try posting in the Microsoft forums. LibreOffice also has community support.

  • To build the waveform.vi function how to calculate the value of dt

    Dear all

    Please guide me How to calculate the value of dt according to waveform.vi of construction

    My sampling rate is 25000 and I take 200000 samples.

    Kind regards

    Muhammad Irfan

    It's all simple arithmetic. The inverse of the sampling frequency power of samples is then the dt or the time between samples the number of samples is not relevant.

  • State machine: how to find the number of transitions:

    Hi Member

    I have this machine of States show below

    where x: output input and y where the two streams of bits each and zeros

    I ask how can I calculate the number of transitions between s1 to s1, s1, S2, s2 to s1, s2, s3 and up to s6 to s6, s6 to s5 and so on

    all chanage in lv I'll gracfull

    I thank you in advace

    Man, it is not difficult to read using LabVIEW on nodes of property.

    Right click on your am' value on the diagram, select "create one-> property node", right click and select 'Edit to write' and the little hand tool to select the 'value' to the subject property. Then it wire to the output of your block on the right.

  • Calculate the number of fringes

    Is anyone know the feasibility of the use of the Machine Vision or LabView to calculate the number of fringes in each region? (Attached image). I want to count how many white line on each region. For example, on the attached picture, there are about 6 regions and each region will display the number of the white line in their own region. For information, I have V8.5 of LabView and NI Vision Assistant V8.5. Please, give me some ideas on how to solve it.

    Thank you.

    Farid

    Check this box

  • Calculate the number of days remaining until the next anniversary. Help, please!

    Hi guys,.

    I'm new to the forum and to the development of BB. So please do not judge harshly if the answer to my question seems obvious.

    I need to calculate the number of days until the next birthday (taking into account any valid birth date)

    After looking at the API and the forum search, I realized that I could

    calculate the difference between two dates in milliseconds and then divide the delta of the value of a day in milliseconds. That is to say:

    birthdayCalendar.set (Calendar.YEAR, those);

    Date1 = birthdayCalendar.getTime () .getTime ();

    date2 = System.currentTimeMillis ();

    Delta = date1 - date2

    numOfDays = delta\DateTimeUtilities.ONEDAY

    Here's my question. How do I create a valid date1 what about leap years?

    Maybe there's a better way to solve this problem?

    Any help is greatly appreciated.

    I agree that the determination of the number of days between today and Feb. 29 could be a little difficult, if it is not a leap year.  I suspect that the calendar has a certain built-in mechanism to compensate for this, but your solution to choose a date is better.

    DST has a role to play, and Yes, the calendar makes up for it.  Let us take two dates, for example (before DST) March 1 and June 1 (after the DST).  If you take a calendar and set the same hour, minute, etc., they are all the same except for dates, then subtract one from the other, and then divide by the number of milliseconds in 1 hour, you calculate the number of hours between the same time on two different days.  You will find that it is not a multiple of 24 hours - because there is actually an hour less than the number of days since the clocks move forward (in the northern hemisphere anyway...),

    In your case, you are not calculating the number of hours, you calculate the number of days.  But you will be dividing by [24 * (time in an hour)].  If you take [23 * (time in an hour)] and divide it by [24 * (time in an hour)], using arithmetic on integers, you will end up 0.  The easiest to get around this, who also works for the end of the DST too, is to simply add one hour to the date before the division.

    Hope that makes sense...

  • How to calculate the sum of two digital form fields based on the selection of the checkbox.

    I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B

    _ Field - 2

    _ Field - A 4

    [check] _ _ field - 6 C

    [disabled] _ _ field - 2 C

    Thank you

    The custom field C calculation script could be:

    (function () {
    
        // Get the values of the text fields, as numbers
        var v1 = +getField("A").value;
        var v2 = +getField("B").value;
    
        // Set this field's value based on the state of the check box named "CB"
        if (getField("CB").value !== "Off") {
            event.value = v1 + v2;
        } else {
            event.value = v1;
        }
    
    })();
    

    Replace 'A', 'B', and 'CB' with the real names of the fields.

Maybe you are looking for