Do not get value '0000' excel instead it showing '0'

Hi all

Greetings!

I have a requirement to create new report for GL. report displays details of the account.

When my subaccount value is "0000" I'm correctly in the output xml as < subaccout > < subaccout > 0000.

But when I discover the output in Excel by obtaining the value "0" instead of "0000".

How to display the "0000" value in excel.

Help, please...

Thank you
Rajesh

Two ways to do this...




or

< ?concat(subaccout,' ')? >

Tags: Business Intelligence

Similar Questions

  • Can not get updates Windows 7, error code 646

    Windows updates fail almost always error code 646 today.

    Other error codes are application error 100, event id 1000 and mshtnl.dll (registry errors?)

    8 Windows Explorer has stopped working properly, running on windows 7

    There has been a change in the health of windows, event 42

    Here are some of my problems

    * original title - can not get updates, Windows 7 instead of 8 as its supposed to, registry errors *.

    Code error '0 x 80070646', '646', or '1606' when you try to install the Office updates

    http://support.Microsoft.com/kb/2258121 releasing It Easy: with Windows | ActiveWin | Laptops | Microsoft MVP

  • RandomGen elements, case structure nothing if it's false, while the loop passes iterations, can not get the values in table outside the structure of the case

    Hello!

    I tried to build a trigger that triggers a true value each 1000 milliseconds (from the first real);

    which real command structure box to a value of the randomNrGen of the sample and place it in a table.

    but I would like to USE this table and I can't do this beacause I can not get out of the structure of the case.

    AND:

    the while loop ignores samples; If you run the vi and look at the speed at which the table fills, ypu notice it is not periodic: the first few items are inserted at 1 second interval, but then it jumps one;

    would it be because of the wait time 1ms?

    1. How can I create a structure that does this:

    If set to True, it samples a value from Genesis at random and places it in the table

    OTHERWISE, it does NOTHING, without zeros sent to the table just waiting for the next true and only the values sampled at True remain in the table?

    2. How can I stop it pop samples (multiples of 1000 in my case)?

    In conclusion: I need to be able to take samples on the sample generator and store them in an array of 3d in a zig - zag (1.jpg) way, but able to think about it, we need to go beyond these two questions.

    Please ignore the meter.

    Please help me!

    TibiG wrote:

    Thanks, Crossrulz!

    This did not omit all values and it works fine.

    Is it possible to get information in a case without making use of the large loop?

    My program will become very complex (I need to synchronize a magnetometer and a stepper motor to make a 3d map of the magnetic field of the magnet) and I want to do everything as simple as possible.

    If there is a way to get information about a case structure, other tnan using registers with shift on the big loop, and you know it, please show me.

    Thank you!

    You could also use a Feedback node, just keep it out of the structure of the case.

  • ValueChangeListner do not get fired when I entered the same value after you remove the first.

    Hello world

    Can anyone help on this.

    JDeveloper version 11.1.1.7

    I use '< af:inputText >' with valueCaangeListner.

    Here as soon as I entered a value, valueChangeListener get fired...

    Problem:

    When I remove the and I entered the same gain value in the text entry box, ValueChangeListner do not get fired.

    When I came again, a value different valueChangelistner get me fired.

    Kind regards

    Malenfant.

    What you say is logic and sense, you enter 500 then delete 00 then add 00 in inputText perspective there is no change in place, therefore, the converter does not occur because there is no changes occur.

    To do something like that you can do a work around using javascript. You can follow these steps:

    1. Select af:inputText and bind it to the backbean

    
    

    2 - Add clientListener and serverListener inside inputText as:

    
        
        
        
    
    

    3 - Add handelEnterButton as javascript method:

    function handelEnterButton(event)
    {
      var code=event.getKeyCode();
      if (code==13)
      {
         var source = event.getSource();
         AdfCustomEvent.queue(source,"serverListenerOperations", {}, false);
      }
    }
    

    4. in the method of serverListener back bean refresh as inputText component:

      public void serverListener(ClientEvent clientEvent)
      {
        RequestContext.getCurrentInstance().addPartialTarget(getMyInputTextComponent());
      }
    

    5. now, try to change something in the inputText and then press enter

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

  • selecting a value in the drop-down list but page must not get recharged again.

    Hello
    I created a drop-down list. After you have selected a value from him, I can get a value in the box of text below according to updon one sql query. but the problem is that I HAV to select Page Action when the changed value parameter to the set value and redirect. Thanks to her whenever I have to select a value from the drop-down list, page get updated. Is there a way that will satisfy the requirement but page does not get new dependants.
    I use apex 4.2.
    Thank you

    You can create A dynamic Action to set the value while changing the value in the Select list (drop-down list).

    Event: change
    Selection type: item (s)
    Article (s): choose your selection list item
    Action: Execute the PL/SQL Code
    PL/SQL code:

    begin
    select colum_name into :Px_text_item_name from table where column_name=:px_select_list_name;
    end;
    

    Page elements to send: px_select_list_name
    Page referred to return: Px_text_item_name

    Its work for me without refreshing the page. Assume that, if you want to pass this value to the element in another page, then use the branch for redirection and assign the value to the element on the page of another.

    Thank you
    Lacombe

  • Boolean value does not get stored in table correctly?

    Hello

    I use the following table to store several variables for similar movieclips:

    public var ballPlaced:Array = new Array(false, false, false);
    
    

    ... However, its not to store the Boolean value correctly in the table?

    I use the following code in the ZoneFill and the ZoneEmpty to assign a value true or false, for example;

    ballPlaced [event.target.name.substring (5)] = true;

    I called a trace to ensure that when an individual ball is placed in an area of the ballPlaced Boolean is true, and that seems to work because it returns a true value... However, I then called a trace to see the status of all and that is to say that all instances of the table are false?

    For example, I put ball0_mc in a box and the trace returns the following...

    Placed ball0_mc (true)
    Ball 0 is set, false: 1 ball is placed, false: ball 2 is set, false

    In this case the second line at the beginning should read "ball 0 is placed, it's true." I know I'm missing something critical here, but can't work out why the Boolean value is not get stored in the array?

    Here is my code... pointers would be greatly appreciated!

    package
    {
        import flash.display.MovieClip;
        import flash.display.DisplayObject;
        import flash.events.MouseEvent;
        import Ball;
           
        public class EgoGame extends MovieClip
        {
            public var _zone0Full:Boolean = false;
            public var _zone1Full:Boolean = false;
            public var _zone2Full:Boolean = false;
           
            public var ballPlaced:Array = new Array(false, false, false);
           
            public function EgoGame()
            {
                ball0_mc.addEventListener(MouseEvent.MOUSE_DOWN, zoneEmpty);
                ball1_mc.addEventListener(MouseEvent.MOUSE_DOWN, zoneEmpty);
                ball2_mc.addEventListener(MouseEvent.MOUSE_DOWN, zoneEmpty);
               
                ball0_mc.addEventListener(MouseEvent.MOUSE_UP, zoneFill);
                ball2_mc.addEventListener(MouseEvent.MOUSE_UP, zoneFill);
                ball1_mc.addEventListener(MouseEvent.MOUSE_UP, zoneFill);
               
                ball0_mc.addEventListener(MouseEvent.MOUSE_UP, playMovie);
                ball1_mc.addEventListener(MouseEvent.MOUSE_UP, playMovie);
                ball2_mc.addEventListener(MouseEvent.MOUSE_UP, playMovie);
               
                   
            private function zoneEmpty(event:MouseEvent):void
            {
                if(event.target.hitTestObject(zone0_mc) && _zone0Full == true)
                {
                   _zone0Full = false;
                    ballPlaced[event.target.name.substring(5)] = false;
                }
                else if(event.target.hitTestObject(zone1_mc) && _zone1Full == true)
                {
                    _zone1Full = false;
                    ballPlaced[event.target.name.substring(5)] = false;
                }
                else if(event.target.hitTestObject(zone2_mc) && _zone2Full == true)
                {
                    _zone2Full = false;
                    ballPlaced[event.target.name.substring(5)] = false;
                }
                else
                {
                    event.target.x = event.target._startX;
                    event.target.y = event.target._startY;
                    ballPlaced[event.target.name.substring(5)] = false;
                }  
                }
           
            private function zoneFill(event:MouseEvent):void
            {
                if(event.target.hitTestObject(zone0_mc) && _zone0Full == false)
                {
                    event.target.x = zone0_mc.x;
                    event.target.y = zone0_mc.y;
                    _zone0Full = true;
                    ballPlaced[event.target.name.substring(5)] = true;
                    trace(event.target.name + " Placed (" + ballPlaced[event.target.name.substring(5)] + " )");
                }
                else if(event.target.hitTestObject(zone1_mc) && _zone1Full == false)
                {
                    event.target.x = zone1_mc.x;
                    event.target.y = zone1_mc.y;
                    _zone1Full = true;
                    ballPlaced[event.target.name.substring(5)] = true;
                    trace(event.target.name + " Placed (" + ballPlaced[event.target.name.substring(5)] + " )");
                }
                else if(event.target.hitTestObject(zone2_mc) && _zone2Full == false)
                {
                    event.target.x = zone2_mc.x;
                    event.target.y = zone2_mc.y;
                    _zone2Full = true;
                    ballPlaced[event.target.name.substring(5)] = true;
                    trace(event.target.name + " Placed (" + ballPlaced[event.target.name.substring(5)] + " )");
                }
                else
                {
                    event.target.x = event.target._startX;
                    event.target.y = event.target._startY;
                    ballPlaced[event.target.name.substring(5)] =false;
                    trace(event.target.name + " Placed (" + ballPlaced[event.target.name.substring(5)] + " )");
                }
                trace("ball 0 is placed, " + ballPlaced[0] + "  :  ball 1 is placed, " + ballPlaced[1] +"  :  ball 2 is placed, " + ballPlaced[2]);
            }
           
            private function playMovie(event:MouseEvent):void
            {
                if (ballPlaced[0] == true)
                {
                    ball0_mc.gotoAndPlay(2);
                }
                else
                {
                    ball0_mc.gotoAndStop(1);
                }
               
                if (ballPlaced[1] == true)
                {
                    ball1_mc.gotoAndPlay(2);
                }
                else
                {
                    ball1_mc.gotoAndStop(1);
                }
               
                if (ballPlaced[2] == true)
                {
                    ball2_mc.gotoAndPlay(2);
                }
                else
                {
                    ball2_mc.gotoAndStop(1);
                }
            }
           
           
        }
    }

    have you checked to see what event.target.name.substring (5) is back?  (TIP: check it out)

  • Values with the HTML not getting informed when using AJAX in the APEX

    Hello

    I use AJAX to fill some values in a tabular report.

    I have a java script of this form (I took this example Denes http://apex.oracle.com/pls/otn/f?p=31517:241:1400877312570049) example

    < script language = "JavaScript" type = "text/javascript" >

    function f_set_multi_items_tabular (pValue, bow) {}
    get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
    = Set_Multi_Items_Tabular', 0);
    {if (pValue)}
    Get.Add ('TEMPORARY_APPLICATION_ITEM', pValue)
    Get.Add ('T_ROWNUM', Prow)
    } else {}
    Get.Add ('TEMPORARY_APPLICATION_ITEM', 'null')
    }

    gReturn = get.get ('XML');

    {if (gReturn)}
    var l_Count = gReturn.getElementsByTagName("item").length;
    for (var i = 0; i < l_Count; i ++) {}
    var l_Opt_Xml = gReturn.getElementsByTagName ("item");
    var l_ID = l_Opt_Xml.getAttribute ('id');
    var l_El = html_GetElement (l_ID);
    {if (l_Opt_Xml.firstChild)}
    var l_Value = l_Opt_Xml.firstChild.nodeValue;
    } else {}
    var l_Value = ";
    }

    {if (l_El)}
    If (l_El.tagName == 'INPUT') {}
    l_El.value = l_Value;
    } Else if (l_El.tagName == 'SPAN' & & l_El.className == 'Raptor') {}
    l_El.parentNode.innerHTML = l_Value;
    l_El.parentNode.ID = l_ID;
    } else {}
    l_El.innerHTML = l_Value;
    }
    }
    }
    }
    get = null;
    }

    < /script >


    And I the process of application as follows
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< body >");
    HTP.prn ("< desc > This XML genericly defines several elements < / desc > '");
    HTP.prn ("< item id =" f05_000 "|: T_ROWNUM |" "> ' |: TEMPORARY_APPLICATION_ITEM |") ("< / item > ');
    HTP.prn ("< / body >");
    END;
    If I have: TEMPORARY_APPLICATION_ITEM as "Vikas" gets it displays correctly, but if I "& lt;" b & gt; Vikas & lt; b & gt;' it shows null. If she tags HTML function l_Opt_Xml.firstChild.nodeValue does not correctly work.
    Please tell me what modiifcation can I use in the l_Opt_Xml.firstChild.nodeValue function to get values with HTML tags also to are displayed.

    Thank you
    Vikas

    Vikas,

    Try to escape special characters:

    htf.escape_sc(:TEMPORARY_APPLICATION_ITEM)
    

    Kind regards
    Dan

  • When I try to "Optimize the readers", I get "Value is not available" on a SSD

    I am running Windows 8 Pro. I can't optimize my SSD. I read online that I should be able to click on "Optimize" and who would send my SSD TRIM data in order to improve its performance. But currently "Analyze" and "Optimize" buttons are grayed out for my solid state drive. The current state also show "optimization is not available.

    Thanks for any help.

    Same thing here.

    Went to Windows "Optimizing disks", click on optimizing, but he said "Value is not available" and then the button "Optimize" changed in gray.

    When I manually ran the automatic Maintenance (Control Panel > Action Center > maintenance > start maintenance), I noticed a lot of reading and writing for the SSD during the maintenance process.  So I opened 'Optimize the readers' and he has done exactly as she was running the Disk Defragmenter (despite it, grateful that he was a Solid State Drive).  I looked in the resource monitor to see what that wrote for the SSD and I don't remember the exact name of the process, but it was something with defrag in the name.  I had already done Windows Experience Index before that, then Windows knew that an SSD has been installed and it showed as such under 'média Type', so I don't know why it was running a disk defragmentation.

    I just ran the automatic Maintenance again, but this time it doesn't seem to be running defrag as it did the first time I ran it.  But, it continues to display "Value is not available" to optimize disks.

    Then, when he says "Value is not available", which means exactly?  DisableDeleteNotify showing 0 (indicating the PAD is on), but is windows sends always TRIM wants the SSD or not?

  • Get 'not enough values error' in bulk collect

    I want to insert all the rows in the employees table in the tmp table which has the structure.

    Purpose: Try just feature fired block to create a return to the top of a table.

    Problem: My code is to not "enough of values" error please report if mistaken.

    structure of the employees table:

    SQL > desc employee;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    EMPLOYEE_ID NOT NULL NUMBER (6)

    FIRST NAME VARCHAR2 (20)

    LAST_NAME NOT NULL VARCHAR2 (25)

    EMAIL NOT NULL VARCHAR2 (25)

    PHONE_NUMBER VARCHAR2 (20)

    HIRE_DATE NOT NULL DATE

    JOB_ID NOT NULL VARCHAR2 (10)

    SALARY NUMBER (8.2)

    COMMISSION_PCT NUMBER (2.2)

    MANAGER_ID NUMBER (6)

    DEPARTMENT_ID NUMBER 4

    tmp table structure:

    SQL > tmp desc;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    EMPLOYE_ID NUMBER (6)

    FIRST NAME VARCHAR2 (20)

    LAST_NAME NOT NULL VARCHAR2 (25)

    EMAIL NOT NULL VARCHAR2 (25)

    PHONE_NUMBER VARCHAR2 (20)

    HIRE_DATE NOT NULL DATE

    JOB_ID NOT NULL VARCHAR2 (10)

    SALARY NUMBER (8.2)

    COMMISSION_PCT NUMBER (2.2)

    MANAGER_ID NUMBER (6)

    DEPARTMENT_ID NUMBER 4

    SQL > select * from tmp;

    no selected line

    Code:

    declare

    type rec is the employee table % rowtype

    index by pls_integer;

    a rec;

    Start

    Select * bulk collect in a

    employees;

    ForAll i in a.first... a.Last

    Insert into tmp values (a (i));

    end;

    /

    Result:

    SQL > declare

    2

    3 type rec is the employee table % rowtype

    4 index of pls_integer;

    5 a rec;

    6

    7. start

    8 remove tmp;

    9 select * bulk collect in a

    10 employees;

    11 ForAll i in a.first... a.Last

    12 insert into tmp values (a (i));

    13 end;

    14.

    Insert into tmp values (a (i));

    *

    ERROR on line 12:

    ORA-06550: line 12, column 13:

    PL/SQL: ORA-00947: not enough values

    ORA-06550: line 12, column 1:

    PL/SQL: SQL statement ignored

    Remove parentheses

    insert into tmp values a(i);
    

    or call the individual columns

    insert into tmp( employee_id, first_name, ... )
     values( a(i).employee_id, a(i).first_name, ... );
    

    Justin

  • get the unwanted letters instead of the picture in an e-mail message.

    Hi all


    I try to send a mail via gmail.com that I am able to send mail, but when I try
    Send an attachment so I get strange text instead of the picture
    his photo not showing but it is different in shape text appears in my Inbox.
    Here is the result.
    also get this error but I am able to send e-mail.
    ERROR at line 1:
    ORA-20000: Failed to send mail due to the
    following error: ORA-29277: invalid SMTP operation
    ORA-06512: at "MAIL.MAHI", line 159
    ORA-06512: at line 2
    ===============================================
    --BACKUP.SECBOUNDContent-
    Type: application/octet-streamContent-Disposition:
     attachment; filename="g.gif"Content-Transfer-Encoding: base64 
    Qk2O5QgAAAAAADYAAAAoAAAAwgIAABMBAAABABgAAAAA
    AFjlCAAAAAAAAAAAAAAAAAAAAAAAhNWuhNWuhNWuhNWu
    hNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuh
    NWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNW
    uhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhN
    WuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuh
    NWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWu
    hNWuhNWuhNWuhNWuhNWuhNWuhNWuhN
    WuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuh
    NWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNW
    uhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhN
    WuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhN
    and here the link that I followed to use with my codes...
    Re: Sending a message UTL_SMTP collateral issue unique jpg
    create or replace package body Mahi
           is
              -- Write a MIME header
              procedure write_mime_header (
                  p_conn in out nocopy utl_smtp.connection
               , p_name in varchar2
                , p_value in varchar2
              )
               is
              begin
                utl_smtp.write_data ( p_conn
                                     , p_name || ': ' || p_value || utl_tcp.crlf
                 );
             end;
             procedure mail (
                p_sender in varchar2
              , p_recipient in varchar2
               , p_subject in varchar2
               , p_message in varchar2
              )
              is
                l_conn           utl_smtp.connection;
                nls_charset    varchar2(255);
               v_src_loc  BFILE := BFILENAME('BACKUP', 'Logon.jpg');
               --v_src_loc BLOB;
          l_buffer   RAW(54);
          l_amount   BINARY_INTEGER := 54;
          l_pos      INTEGER := 1;
          l_blob     BLOB := EMPTY_BLOB;
          l_blob_len INTEGER;
         v_amount   INTEGER;
                  v_fname VARCHAR2(50);
    
         CURSOR img_cur IS SELECT photo_name,photo
      FROM temp_photo;
     
    
        --crlf  varchar2(2) := chr(10)||chr(13);
    
    PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
       BEGIN
          UTL_SMTP.WRITE_DATA(l_conn,
                              pi_name || ': ' || pi_header || UTL_TCP.CRLF);
       END;
    
             begin
                -- get characterset
                select value
                into   nls_charset
                from   nls_database_parameters
                where  parameter = 'NLS_CHARACTERSET';
                /*
                select 
                photo into v_src_loc from
                temp_photo
                where id=1;
                */
                DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
         DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
         v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
         DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
         --DBMS_LOB.COPY(l_blob, v_src_loc, v_amount);
         l_blob_len := DBMS_LOB.getlength(l_blob);
     
               -- establish connection and autheticate
               l_conn   := utl_smtp.open_connection (g_smtp_host, g_smtp_port);
                utl_smtp.ehlo(l_conn, g_smtp_domain);
                 utl_smtp.command(l_conn, 'auth login');
                 utl_smtp.command(l_conn,utl_encode.text_encode('[email protected]', nls_charset, 1));
                utl_smtp.command(l_conn, utl_encode.text_encode('xxxxx', nls_charset, 1));
                 -- set from/recipient
                  utl_smtp.command(l_conn, 'MAIL FROM: <'||p_sender||'>');
                 utl_smtp.command(l_conn, 'RCPT TO: <'||p_recipient||'>');
                -- write mime headers
                 utl_smtp.open_data (l_conn);
                 write_mime_header (l_conn, 'From', p_sender);
                write_mime_header (l_conn, 'To', p_recipient);
                write_mime_header (l_conn, 'Subject', p_subject);
                 write_mime_header (l_conn, 'Content-Type', 'text/plain; charset=us-ascii');
                 write_mime_header (l_conn, 'X-Mailer', g_mailer_id);
                 utl_smtp.write_data (l_conn, UTL_TCP.CRLF);
                 UTL_SMTP.WRITE_DATA(l_conn,
                             'MIME-Version: 1.0' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' boundary= "' || 'BACKUP.SECBOUND' || '"' ||
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
       
     
                 -- write message body
                utl_smtp.write_data (l_conn, p_message);
                OPEN img_cur;
      LOOP
      FETCH img_cur INTO v_fname,l_blob;
    end loop;
    close img_cur;
                
                UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: text/plain;' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' charset=US-ASCII' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,  p_message || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
         
         UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: application/octet-stream' ||
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' filename="' || 'gpg.jpg' || '"' || --My filename
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
      /* Writing the BLOL in chunks */
        WHILE l_pos < l_blob_len LOOP
          DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
          UTL_SMTP.write_raw_data(l_conn,
                                  UTL_ENCODE.BASE64_ENCODE(l_buffer));
          UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
           l_buffer := NULL;
           l_pos    := l_pos + l_amount;
         END LOOP;
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
       
        -- Close Email
        UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || '--' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
                             UTL_SMTP.CLOSE_DATA(l_conn);
                             utl_smtp.close_data (l_conn);
         UTL_SMTP.QUIT(l_conn);
         DBMS_LOB.FREETEMPORARY(l_blob);
         DBMS_LOB.FREETEMPORARY(l_blob);
         DBMS_LOB.FILECLOSE(v_src_loc);
     
                    -- end connection
                utl_smtp.quit (l_conn);
                        exception
                 when others
                 then
                   begin
                      utl_smtp.quit(l_conn);
                    exception
                      when others then
                       null;
                   end;
                   
                   raise_application_error(-20000,'Failed to send mail due to the
     following error: ' || sqlerrm);
     DBMS_LOB.FREETEMPORARY(l_blob);
     DBMS_LOB.FREETEMPORARY(l_blob);
          DBMS_LOB.FILECLOSE(v_src_loc);
         raise;
             end;
          end;
          commit;
    Note:-I am using Stunnel, Oracle Database 11g R2 and operating system is Linux...
    I have installed Linux on virtualBox.


    Please suggest me why I get a strange text instead of the picture?
    If my code is wrong, please fix it for me...
    Thanks in advance...

    Tic Tac Toe
    Student.

    Published by: Johann April 15, 2011 22:57

    The main problem is, you have not specified clearly what you are doing and also not a not post your package specifications. After looking more closely at your code, I found that you use gmail.smtp.com and probably with stunnel (UTL_SMTP supports SSL).
    In addition, the main idea is to http://monkeyonoracle.blogspot.com/2009/11/plsql-and-gmail-or-utlsmtp-with-ssl.html
    If you would like to mention these facts, then probably someone can help you more sooner. In any case, it is an example of work of sending e-mail by using the gmail SMTP server.

    SQL> conn sys@orclsb as sysdba
    Enter password: ******
    Connected.
    SQL>
    SQL> SHOW USER
    USER is "SYS"
    SQL>
    SQL> /* My database version */
    SQL> SELECT * FROM v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    
    SQL> /* Creating DIRECTRY OBJECT. The physical path is C:\ */
    SQL> CREATE DIRECTORY saubhik AS 'C:\';
    
    Directory created.
    
    SQL> /* Giving required grants to user SCOTT */
    SQL> GRANT READ,WRITE ON DIRECTORY saubhik TO scott;
    
    Grant succeeded.
    
    SQL> /* Now connecting to the user scott, to run the emailing procedure */
    SQL> conn scott@orclsb
    Enter password: *****
    Connected.
    SQL>
    SQL> SHOW USER
    USER is "SCOTT"
    SQL>
    SQL> 
    

    Now, the code principal.

    SQL> SHOW USER
    USER is "SCOTT"
    SQL>
    SQL> DECLARE
      2    v_nls_charset VARCHAR2(50);
      3    /*LOB operation related varriables */
      4    v_src_loc  BFILE := BFILENAME('SAUBHIK', 'Winter.jpg');
      5    l_buffer   RAW(54);
      6    l_amount   BINARY_INTEGER := 54;
      7    l_pos      INTEGER := 1;
      8    l_blob     BLOB := EMPTY_BLOB;
      9    l_blob_len INTEGER;
     10    v_amount   INTEGER;
     11
     12    /*UTL_SMTP related varriavles. */
     13    v_connection_handle  UTL_SMTP.CONNECTION;
     14    v_from_email_address VARCHAR2(30) := '[email protected]';
     15    v_to_email_address   VARCHAR2(30) := '[email protected]';
     16    /*
     17     I have used stunnel to send mail using smtp.gmail.com
     18     To get stunnel see http://stunnel.org/.
     19     The ORIGINAL idea is here :
     20     http://monkeyonoracle.blogspot.com/2009/11/plsql-and-gmail-or-utlsmtp-with-ssl.html
     21    */
     22    v_smtp_host          VARCHAR2(30) := 'localhost';
     23    v_subject            VARCHAR2(30) := 'Your Test Mail';
     24    l_message            VARCHAR2(200) := 'This is test mail using UTL_SMTP';
     25
     26    /* This send_header procedure is written in the documentation */
     27    PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
     28    BEGIN
     29      UTL_SMTP.WRITE_DATA(v_connection_handle,
     30                          pi_name || ': ' || pi_header || UTL_TCP.CRLF);
     31    END;
     32
     33  BEGIN
     34
     35    SELECT value
     36      INTO v_nls_charset
     37      FROM nls_database_parameters
     38     WHERE parameter = 'NLS_CHARACTERSET';
     39
     40    /*Preparing the LOB from file for attachment. */
     41    DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
     42    DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
     43    v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
     44    DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
     45    l_blob_len := DBMS_LOB.getlength(l_blob);
     46
     47    /*UTL_SMTP related coding. */
     48    v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host,
     49                                                    port => 1925);
     50    UTL_SMTP.EHLO(v_connection_handle, 'gmail.com');
     51    UTL_SMTP.COMMAND(v_connection_handle, 'auth login');
     52    UTL_SMTP.COMMAND(v_connection_handle,
     53                     UTL_ENCODE.TEXT_ENCODE('[email protected]',
     54                                            v_nls_charset,
     55                                            1));
     56    UTL_SMTP.COMMAND(v_connection_handle,
     57                     UTL_ENCODE.TEXT_ENCODE('my password', v_nls_charset, 1));
     58    --UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
     59    --UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
     60    UTL_SMTP.COMMAND(v_connection_handle,
     61                     'MAIL FROM: <' || v_from_email_address || '>');
     62    UTL_SMTP.COMMAND(v_connection_handle,
     63                     'RCPT TO: <' || v_to_email_address || '>');
     64    UTL_SMTP.OPEN_DATA(v_connection_handle);
     65    send_header('From', '"Sender" <' || v_from_email_address || '>');
     66    send_header('To', '"Recipient" <' || v_to_email_address || '>');
     67    send_header('Subject', v_subject);
     68    --MIME header.
     69    UTL_SMTP.WRITE_DATA(v_connection_handle,
     70                        'MIME-Version: 1.0' || UTL_TCP.CRLF);
     71    UTL_SMTP.WRITE_DATA(v_connection_handle,
     72                        'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
     73    UTL_SMTP.WRITE_DATA(v_connection_handle,
     74                        ' boundary= "' || 'SAUBHIK.SECBOUND' || '"' ||
     75                        UTL_TCP.CRLF);
     76    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
     77
     78    -- Mail Body
     79    UTL_SMTP.WRITE_DATA(v_connection_handle,
     80                        '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
     81    UTL_SMTP.WRITE_DATA(v_connection_handle,
     82                        'Content-Type: text/plain;' || UTL_TCP.CRLF);
     83    UTL_SMTP.WRITE_DATA(v_connection_handle,
     84                        ' charset=US-ASCII' || UTL_TCP.CRLF);
     85    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
     86    UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
     87    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
     88
     89    -- Mail Attachment
     90    UTL_SMTP.WRITE_DATA(v_connection_handle,
     91                        '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
     92    UTL_SMTP.WRITE_DATA(v_connection_handle,
     93                        'Content-Type: application/octet-stream' ||
     94                        UTL_TCP.CRLF);
     95    UTL_SMTP.WRITE_DATA(v_connection_handle,
     96                        'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
     97    UTL_SMTP.WRITE_DATA(v_connection_handle,
     98                        ' filename="' || 'Winter.jpg' || '"' || --My filename
     99                        UTL_TCP.CRLF);
    100    UTL_SMTP.WRITE_DATA(v_connection_handle,
    101                        'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
    102    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    103
    104    /* Writing the BLOL in chunks */
    105    WHILE l_pos < l_blob_len LOOP
    106      DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
    107      UTL_SMTP.write_raw_data(v_connection_handle,
    108                              UTL_ENCODE.BASE64_ENCODE(l_buffer));
    109      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    110      l_buffer := NULL;
    111      l_pos    := l_pos + l_amount;
    112    END LOOP;
    113    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    114
    115    -- Close Email
    116    UTL_SMTP.WRITE_DATA(v_connection_handle,
    117                        '--' || 'SAUBHIK.SECBOUND' || '--' || UTL_TCP.CRLF);
    118    UTL_SMTP.WRITE_DATA(v_connection_handle,
    119                        UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
    120
    121    UTL_SMTP.CLOSE_DATA(v_connection_handle);
    122    UTL_SMTP.QUIT(v_connection_handle);
    123    DBMS_LOB.FREETEMPORARY(l_blob);
    124    DBMS_LOB.FILECLOSE(v_src_loc);
    125
    126  EXCEPTION
    127    WHEN OTHERS THEN
    128      UTL_SMTP.QUIT(v_connection_handle);
    129      DBMS_LOB.FREETEMPORARY(l_blob);
    130      DBMS_LOB.FILECLOSE(v_src_loc);
    131      RAISE;
    132  END;
    133  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    I got the email in my email perfectly with the attachment.

  • Fresh fired for FORALL does not not enough values error

    Hello

    I am trying to copy data from one table to the other which have a different number of columns. I do the following. But he threw not enough values error.

    Table A has more than 10 million records. So I use bulk collect instead of using insert into select from.

    TABLE A (has the more columns - 25)
    Number of C1
    number of C2
    VARCHAR2 C3
    C4 varchar2
    ...
    ...
    ...
    C25 varchar2

    TABLE B (less than columns - like 7)
    Number of C1
    number of C2
    VARCHAR2 C3
    C4 varchar2
    number of C5
    date of C7
    C10 varchar2

    declare

    TYPE c IS REF CURSOR;

    c V_c;

    v_Sql VARCHAR2 (2000);
    Table TYPE is table B % ROWTYPE;
    L_data table;


    Start

    v_Sql: = 'SELECT c1, c2, c3, c4, c5, c7, c10 OF A ORDER BY c1;

    V_c OPEN FOR v_Sql;

    LOOP
    Fetch the v_c COLLECT LOOSE ldata LIMIT 100000;

    FORALL i in 1... lData. Count
    INSERT
    B
    VALUES ldata (i);

    END LOOP;
    COMMIT;

    exception
    WHILE OTHERS THEN
    ROLLBACK;
    dbms_output.put_line ('Exception occurred' |) SQLERRM);
    END;


    When I run this, I get
    PL/SQL: ORA-00947: not enough values

    Any suggestions please. Thanks in advance.

    Table A has more than 10 million records. So I use bulk collect instead of using insert into select from.

    That makes sense to me. An INSERT... SELECT will be more effective, easier to manage, easier to write and easier to understand.

    INSERT INTO b( c1, c2, c3, c4, c5, c7, c10 )
      SELECT c1, c2, c3, c4, c5, c7, c10
        FROM a;
    

    will be faster, use fewer resources, much less error-prone and have a more obvious use when a maintenance programmer coming that any PL/SQL block that does the same thing.

    If you insist on the use of PL/SQL, what version of Oracle are you using? You should be able to do something like

    DECLARE
      TYPE b_tbl IS TABLE OF b%rowtype;
      l_array b_tbl;
    
      CURSOR a_cursor
          IS SELECT c1, c2, c3, c4, c5, c7, c10 FROM A;
    BEGIN
      OPEN a_cursor;
      LOOP
        FETCH a_cursor
         BULK COLLECT INTO l_array
        LIMIT 10000;
    
        EXIT WHEN l_array.COUNT = 0;
    
        FORALL i IN l_array.FIRST .. l_array.LAST
          INSERT INTO b
            VALUES l_array(i);
      END LOOP;
      COMMIT;
    END;
    

    At least, that eliminates the infinite loop and the unnecessary dynamic SQL. If you are using older versions of Oracle (it is always useful to display this information at the front), the code may need to be a little more complex.

    Justin

    Published by: Justin cave on January 19, 2011 17:46

  • Not enough values error

    I get this error in the following query. What could be the problem?

    Insert into Identification@Indus_Link
    (Vno,
    Employeecode,
    Employeeno, Employeename, Fathername, Nicno, Fathernicno, Dob, city, District, address, telephone, Mobile, Entrydate, Jobtitle, Jobnature, Joiningdate, Confirmationdate, rest, Issuspended, Eobino, Ssno, Shiftcode, Jobtype, Accountno, Departmentid, Educationcode, experience, Eobi, Ntn, Identification_Mark, sex, Fromdate, so far
    )
    Values (IDSEQ, EMPCODE, EMPNO,
    (Select Employeename, Fathername, Nicno, Fathernicno, date of birth, city,
    Neighborhood, address, telephone, Mobile, Entrydate,
    Current_Designation (Employeecode),
    Current_Jobnature (Employeecode), Joiningdate,
    Still, Issuspended, Eobino, Confirmationdate, Ssno,
    Current_Shift (Employeecode),
    Current_Jobtype (Employeecode), Peru,
    Current_Department (Employeecode), Educationcode,
    Eobi, Ntn, Identification_Mark, sex, experience
    FromDate, so far
    Identification
    Where Employeecode = '911145')
    )

    The values are enough.

    No, they are not... that's what means the error message...

    Willy says:
    IDSEQ,
    EMPCODE,
    EMPNO,

    are variables.

    Yes I know.. I was referring to the SELECT... This should be a scalar subquery

    SQL> create table test
      2  (id number
      3  ,name varchar2(50)
      4  ,lastname varchar2(50)
      5  )
      6  /
    
    Table created.
    
    SQL>
    SQL> insert into test
      2  values (1, (select 'something', 'other' from dual))
      3  /
    insert into test
                *
    ERROR at line 1:
    ORA-00947: not enough values
    
    SQL>
    SQL>
    SQL> insert into test
      2  values (1, 'something', 'other')
      3  /
    
    1 row created.
    
    SQL> 
    

    do this instead:

    insert ...
    Select IDSEQ, EMPCODE, EMPNO,Employeename, Fathername, Nicno, Fathernicno, Dob, City,
    District, Address, Phone, Mobile, Entrydate,
    Current_Designation (Employeecode),
    Current_Jobnature (Employeecode), Joiningdate,
    Confirmationdate, Rest, Issuspended, Eobino, Ssno,
    Current_Shift (Employeecode),
    Current_Jobtype (Employeecode), Accountno,
    Current_Department (Employeecode), Educationcode,
    Experience, Eobi, Ntn, Identification_Mark, Gender,
    Fromdate, Todate
    From Identification
    Where Employeecode = '911145'
    )
    
  • How to paste special values from excel

    I use tor Excel Mac.

    I was sent a spreadsheet "number". For what I do in Excel I use Copy > click right to "paste special" > values.

    Job done.

    When I try this with the 'Numbers' Clipboard window special dough gives me options of text, HTML, PDF, Unicode text and photo.

    I would greatly appreciate some advice.

    Thank you.

    Hi srvw,.

    Do the conversion in number.

    "Paste Special > values" in Excel = 'Paste the results of the formulas' in number.

    Here is a document of numbers with a formula in column C

    Select and copy the C column.

    Add another column (D).

    In column D, Menu > edit > paste formula results.

    The values are now real (no formulas).

    Column D to copy and paste into Excel.

    Kind regards

    Ian.

    Edit: I use numbers 3.6.1 on OS X El Capitan. If your profile is up to date (and that you use Numbers ' 09) menu is command 'paste values' not 'paste it formula results.

    Ian.

  • Variable shared do not get updated in host VI

    Hi all

    I recently bought a surfboard myRIO and began working with her. I would like to use the shared variable to get the rates of local lines all in porting my labview code later. However, I am not able to use the shared variable functionality at all, even for a simple code. I created a variable that is shared in the host pc and used in the RT and host VI. I guess that when I run the RT VI and VI of the host, the value given to the variable of the RT VI should be included in the host VI. However, this is not the case. The indicator to the host VI is still zero himself. I went through all the threads of myRIO related, but could not get any guidance. Thanks in advance.

    Arya

    Hi Sam

    The program works now. I find this strange because I didn't have even a single change on my system, not even a reboot. I have a open and run the example of shared variable comes with labview. It worked fine, then I tried my code, and also, it began to update the loop counts. Quite strange! Thanks for the reply.

    Arya

Maybe you are looking for