PL/SQL procedure to insert data doesn't work and unable to find reason.

Sorry that I couldn't find the best place to post this question. It seems that the forum does not deal with this kind of question. I post here for help.
I have a stored procedure to insert data into one table. SP was compiled without error and executed without error (from log table to get information). But the data was not inserted into
the target table. I have tried different way to figure out the reason. But I failed to get any idea. Please help me to find possible reasons. The smple SP looks like this:
CREATE OR REPLACE PROCEDURE my.sp_insert( P_DATE IN VARCHAR2)
IS
declare section
begin
insert into target_table (column1, column2, column3, column4)
select record1, record2, record3, record4 from table1, table2, table3, table4
where clause;
commit;
exception section
UPDATE PROCESS_LOG_TABLE CLAUSE;
html_email section;
rollback;
end my.sp_insert
I have tested that "select record1, record2, record3, record4 from table1, table2, table3, table4" really fetch the 7,000 records. and if I only run part of SQL from SQLPLUS as
insert into target_table (column1, column2, column3, column4)
select record1, record2, record3, record4 from table1, table2, table3, table4
where clause;
It will work and insert 7,000 records into target table. Why did it not insert into target_table when execiting as stored procedure? Please help with your input. Thanks.
Edited by: citicbj on Feb 12, 2013 4:15 PM

Dear Friend,
Is the user from which you created database procedure and sqlplus that you tested the code successfully is same?
Regards
Ahamed Rafeeque Cherkala

Similar Messages

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • Mobile data doesn't work and I can't access the front camera.

    Hi, I received my new Xperia Z3 Compact in white just over a week ago and unfortunately I have few unresolved issued with it which kind of spoils the experience of owning a new phone.
    I  just switched from a number of Iphones and Xperia was the handset that really impressed me.
    I couldn't see the point of getting an overpriced Iphone with a limited storage capability.
    Unfortunately my Xperia Z3c has some issues;
    - I can't get the front camera work
    - I can get my internet only through Wi-Fi and my unlimited 3G data doesn't work at all (T-Mobile U.K)
    - Three Swipe Gesture doesn’t appear to be working as it should on any Android device (I'm told).
    So I am not a very happy user at the moment and slowly starting to miss the Iphone.

    Hi casson50ml,
    Welcome to the community! Since you're new please be sure that you have checked out our Discussion guidelines.
    Sorry to hear about these issues, I would first suggest clearing the data for the camera.
    Menu > settings > Apps > All > Camera > Clear Data
    Once done try using the device.
    In regards to the Internet, try performing an Internet settings download.
    Menu > Settings > More > Internet Settings > Accept Disclaimer > Choose Network.
    Now try using the network data on the handset.
    Can you explain more about the 3 Finger Gesture issue?
     - Official Sony Xperia Support Staff
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • Number pad doesn't work, and can't find Num Lock button

    My number pad has stopped working. I looked in the User Guide which says I have a Num Lock button, but I don't. Where is it located. Thank you.

    Solved - Never mind, I found it. I don't know why I couldn't find it last night. I'd looked for it before without finding it. For some reason, there it was this morning - where it should have been. I guess the computer elf came in an installed it. Thanks to anyone who may have thought of responding.

  • Procedure to insert data in multiple rows

    Hi,
    I need a stored procedure which inserts data into multiple rows..
    Ex: I need to have 3 columns in Procedure, where col3 has limit in size let's say 500.
    If user insert about 1500 in col3, i has to insert first 500 in row1 and 501 - 1000 in row 2 and 1001 - 1500 in row 3.
    Can any one help in creating procedure for above scenario.
    Thanks in Advance...
    Sree

    create table #t (id int, id1 int)
    WITH [1-20]
    AS
    SELECT row_number() over (order by number) rn,number
            FROM master..spt_values
             WHERE type = 'P'
             AND number BETWEEN 1 AND 20
     [21-30]
    AS
    SELECT row_number() over (order by number) rn,number
            FROM master..spt_values
             WHERE type = 'P'
             AND number BETWEEN 21 AND 30
    ) INSERT INTO #t 
      SELECT A.number,B.number FROM
         [1-20] A JOIN [21-30] B ON A.rn=B.rn
    SELECT * FROM #t
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I run a database procedure that inserts data into a table from withi

    How do I run a database procedure that inserts data into a table from within a Crystal report?
    I'm using CR 2008 with an Oracle 10i database containing a number of database tables, procedures and packages that provide the data for the reports I'm developing for my department.  However, I'd like to know when a particular report is run and by whom.  To do this I have created a database table called Report_Log and an associated procedure called prc_Insert_Entry that inserts a new line in the table each time it's called.  The procedure has 2 imput parameters (Report_Name & Username), the report name is just text and I'd like the username to be the account name of the person logged onto the PC.  How can I call this procedure from within a report when it's run and provide it with the 2 parameters?  I know the procedure works, I just can't figure out how to call it from with a report.
    I'd be grateful for any help.
    Colin

    Hi Colin, 
    Just so I'm clear about what you want: 
    You have a Stored procedure in your report.  When the report runs, you want that same procedure to write to a table called Report_Log. 
    If this is what you want the simple answer is cannot be done.  Crystal's fundamental prupose is to read only, not write.  That being said, there are ways around this. 
    One way is to have a trigger in your database that updates the Report_Log table when the Stored Procedure is executed.  This would be the most efficient.
    The other way would be to have an application run the report and manage the entry. 
    Good luck,
    Brian

  • Creating Web service for PL/SQL Procedure with Complex Data Types

    I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?

    Hello,
    When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
    So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
    You can find more information in the:
    - Developing Web Services that Expose Database Resources
    chapter of the Web Service Developer's guide.
    Regards
    Tugdual Grall

  • SPGridView - sorting Dates doesn't work properly & how to display the title column as link?

    Hi,
    I've got a SPGridView that is being filled with data from several lists. Some of them are a date-field and a title-field. I already added sorting, paging and filtering options and at first look they seem to work fine. But now I noticed that sorting dates
    doesn't work as expected. If I select ascending sorting, the result is something like this:
    01.08.2014
    02.08.2014
    17.07.2014
    18.07.2014
    23.07.2014
    If I select descending sorting, the result is this:
    23.07.2014
    18.07.2014
    17.07.2014
    02.08.2014
    01.08.2014
    This isn't what I want obviously. 
    I just added the EventReceiver for the sorting like it is shown in several tutorials:
    (The date field is a BoundField.)
    grid.Sorting += new GridViewSortEventHandler(grid_Sorting);
    private void grid_Sorting(object sender, GridViewSortEventArgs e)
    if (ViewState["FilterExpression"] != null)
    gridDS.FilterExpression = (string)ViewState["FilterExpression"];
    And my second problem is how to add a link to the title column. In my grid I'm displaying tasks from different lists and I want to link the title to the related task. I stumbled accross HyperLinkFields and tried this:
    HyperLinkField hyperLinkField = new HyperLinkField();
    hyperLinkField.DataTextField = "Titel";
    hyperLinkField.DataNavigateUrlFields = new string[] { "Titel" };
    hyperLinkField.DataNavigateUrlFormatString = "{0}";
    hyperLinkField.HeaderText = "Titel";
    hyperLinkField.SortExpression = "Titel";
    grid.Columns.Add(hyperLinkField);
    The resulting link is something like ...sites/MySite/_catalogs/masterpage/A1-V1-2 where "A1-V1-2" is the name of the task and also shown in the title field.
    The actual link should look more like ...sites/MySite/Lists/mytasklistname/DispForm.aspx?ID=.... or something like that to display the task details. How could I achieve that?
    Thanks in advance

    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27718782.html
    Here is the exact code you need to use:
    http://social.msdn.microsoft.com/Forums/ar/sharepointcustomization/thread/c463a8c6-4806-4233-b6a4-8db8369c5fc2
    http://sharepoint.stackexchange.com/questions/53459/change-title-linked-to-item-with-edit-menu-to-different-column
    Open the AllItems.aspx page for the specific list.
    Search for the <ViewFields> tag
    List item LinkToItem="TRUE" to whichever column you want the link:
    <ViewFields><br/>
    <FieldRef Name="Attachments"/><br/>
    <FieldRef Name="LinkTitle"/><br/>
    <FieldRef Name="linkThisColumn" LinkToItem="TRUE"/><br/>
    <FieldRef Name="data_x0020_column"/><br/>
    <FieldRef Name="Another_x0020_column"/><br/>
    </ViewFields><br/>
    http://sharepoint.stackexchange.com/questions/58954/link-title-in-list-to-value-in-url-column
    Create calculated column.
    Insert following formula -
    ="<a href='"&UrlFieldName&"'>"&Title&"</a>"
    Set "data type returned from this formula is" to integer.
    As a result on list view you will see the title with link to your url.
    UPD: It seems that URL field is not valid for calculated column, as workaround you can copy url value in a receiver into the another text field, which is not shown on the view.
    If this helped you resolve your issue, please mark it Answered

  • After updating to ios 7, my data doesn't work, help?

    After I updated it, my data doesn't work. Notifciations would pop up, but I cannot view it. My imesasge still works though.

    I also tried to restore my phone & reset my network... it doesn't work...

  • Privacy - remove all website data doesn't work

    Hi all,
    when I choose privacy > remove all website data - it doesn't work and all the data remains.... (details says many are in cache)
    Q: why is this and how to I remove the data?

    A well known contributor here wrote the following ...
    Cookies have acquired a worse reputation than they deserve.   They cannot hold any executable code, they just hold data and then, only data the user has provided.   You could say they're as dangerous as you let them become.
    And that I think sums it up.    Clearing all website data is counter productive insofar as it removes many cookies that do a useful job and save you time.
    Just take care where you browse, use private browsing if you are unsure and that should be enough.   As an option, I bought an app called 'Cookie'. It's about £10 and I found it very good for a whole range of other cookies like databases and flash cookies.   Read about it at ...
    Download Cookie for Mac - Protect your online privacy. MacUpdate.com
    Thanks for the star. 

  • Lollipop upgrade, mobile data doesn't work

    I upgraded to lollipop today, all fine except my mobile data doesn't work.
    Any ideas?
    Tried turning off and on, switching to airplane mode and back, and changing mobile operator and back, still not working.
    Thanks

    See this topic too:
    https://talk.sonymobile.com/t5/Xperia-Z2/mobile-data-not-working-after-lollipop-update/td-p/956104/page/3

  • Data doesn't work

    My data doesn't work on my new Iphone 5c but I can make calls and text.  The wifi works, but my data doesn't.  I have checked to make sure my data is on and everything.  How can I fix this issue? 

    Hello pcoffey31,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iPhone: Troubleshooting a cellular data connection
    http://support.apple.com/kb/ts3780
    Best of luck,
    Mario

  • HT1918 I cannot access files I uploaded from an old computer.  The email account to which some tracks are connected is deleted. For some reason my birth date doesn't work either. Is there some way to transfer the files to my current address?

    I cannot access files I uploaded from an old computer. The email account to which some tracks are connected is deleted. For some reason my birth date doesn't work either. Is there some way to transfer the files to my current address and username?

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • HT5163 where do I get a SIM card tool for iPad 3?  My cellular data doesn't work now that I downloaded iOS6.  Instructions are to remove SIM card and then reinsert and it SHOULD work.

    Where di I get a SIM card tool for iPad 3?  My cellular data doesn't work now tht I downloaded iOS6.1.  Instructions tell me to remove SIM card and then return.  Will that work? Verizon tells me it's an Apple issue.

    I did that but was intimidated.  With your adivce I was more aggressive and it popped open. And I removed and replaced.  It works.  Thanks!

  • I had to change my Apple ID and password in itunes. Now my icloud doesn't work and I can't update my apps on my iPhone. I have looked at suggestions on the community pages and apple suggestions but none of them are relevant to iOS 8.1.2  icloud just

    I had to change my Apple ID and password in itunes. Now my icloud doesn't work and I can't update my apps on my iPhone. I have looked at suggestions on the community pages and apple suggestions but none of them are relevant to iOS 8.1.2
    icloud just keeps bringing up my old email address & asking for my old password which doesn't exist anymore and when I try to sign out of icloud it wants my old password, when I tried to change my primary email back to the old one it wants me to verify it through an email address that doesn't exist. Please can you help me sort out this nightmare.

    Hi skippy2012trev,
    Welcome to the Apple Support Communities!
    I understand that you updated your Apple Id and password but now you are being prompted for the old information in iCloud. You are on the right track by changing the Apple ID back to the previous email address temporarily so that you can sign out. You should not need to verify the email address. After you edit the Apple ID back to the old email address and then sign out of iCloud on your iPhone, edit the Apple ID back to the address you would currently like to use. There is no need to change the password again, only the email address, unless you prefer to update the password again.
    If you're asked for the password to your previous Apple ID when signing out of iCloud - Apple Support
    Change your Apple ID temporarily
    If signing out and back in to iMessage or FaceTime didn't help, try these steps:
    Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
    Tap Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
    Scroll down and tap Sign Out, then tap Sign Out to confirm. If you're using iOS 7 or earlier, tap Delete Account, then tap Delete to confirm.
    Tap Keep on My [Device] or Delete from My [Device]. In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter the password for your previous Apple ID.
    Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
    Return to Settings > iCloud and sign in with your new Apple ID.
    Cheers,
    Joe

Maybe you are looking for