Getting ORA-06502 error. Don't know why. Please help!

I am getting the following error msgs and don't understand why?
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SMSRPT.SP_DATA_CHECK", line 22
ORA-06512: at line 6
Here is my procedure. Can someone look at it and explain to me what i could possibly be doing wrong here.
create or replace
PROCEDURE sp_data_check(p_date number) is
--DECLARE
v_table_name VARCHAR2(35);
     v_string VARCHAR2(1024);
     v_result number;
     v_output VARCHAR2(1024);
v_report_date VARCHAR2(8);
v_dt VARCJAR2(8);
CRLF char(2) := chr(10)||chr(13);
     CURSOR c_table is
          select table_name
          from user_tab_columns
          where COLUMN_NAME = 'REPORT_DATE'
          and table_name NOT LIKE '%BIN%';
     BEGIN
OPEN c_table;
     loop
          FETCH c_table into v_table_name;
          exit when c_table%NOTFOUND;
          v_string:='select decode(max(report_date),'||p_date||',1,0)'|| ' from ' || v_table_name;
          execute immediate v_string into v_result;
v_report_date:='select max(report_date)'|| ' from ' || v_table_name;
excute immediate v_report_date into v_dt;
          v_output:=v_output||CRLF||v_table_name||': '||v_dt;
end loop;
if v_result =0 then
sp_send_mail('reports@localhost','[email protected]',
'Report Date Not There','The following tables do not have the correct report_date information:'||v_output);
end if;
close c_table;
END;
The bold section of my code is what i added that broke it. Before adding these lines of code it all worked fine.

That worked. Here is the revised working program
create or replace PROCEDURE sp_data_check(p_date number) is
--DECLARE
v_table_name VARCHAR2(35);
     v_string VARCHAR2(1024);
     v_result number;
     v_output VARCHAR2(1024);
v_report_date VARCHAR2(100);
v_dt VARCHAR2(100);
CRLF char(2) := chr(10)||chr(13);
     CURSOR c_table is
          select table_name
          from user_tab_columns
          where COLUMN_NAME = 'REPORT_DATE'
          and table_name NOT LIKE '%BIN%';
     BEGIN
OPEN c_table;
     loop
          FETCH c_table into v_table_name;
          exit when c_table%NOTFOUND;
          v_string:='select decode(max(report_date),'||p_date||',1,0)'|| ' from ' || v_table_name;
          execute immediate v_string into v_result;
v_report_date:='select max(report_date)'|| ' from ' || v_table_name;
execute immediate v_report_date into v_dt;
          v_output:=v_output||CRLF||v_table_name||': '||v_dt;
end loop;
if v_result =0 then
sp_send_mail('reports@localhost','[email protected]',
'Report Date Not There','The following tables do not have the correct report_date information:'||v_output);
end if;
close c_table;
END;

Similar Messages

  • HT4097 Help! Everytime I try to update my iPad 2 on 4.3.3 it get is error message "The iPad "iPad" cannot be restored at this time because the iPad software update server could not be contacted or is temporarily unavailable." I dont know why please help

    Help! Everytime I try to update my iPad 2 on 4.3.3 it get is error message "The iPad "iPad" cannot be restored at this time because the iPad software update server could not be contacted or is temporarily unavailable." I dont know why please help.
    I'm running 4.3.3 on a ipad 2 im computer is connected via wire to internet

    See
    iOS 5: Updating your device to iOS 5
    http://support.apple.com/kb/HT4972
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect to your computer & click on the "Update your device using iTunes".
    Tip - You may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. After you update to iOS 5.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

  • How can I locate my lost iPhone 4s? I have my serial number. But I don't know how. please help me.

    How can I locate my lost iPhone 4s? I have my serial number. But I don't know how. please help me.

    The serial number will not help you locate it.
    IF you turned on the find my iPhone feature on the iPhone itself, then go to iCloud.com
    If you did not, then you cannot locate it.

  • How do i set up a PS3 controller with my mac?Before anyone says its not possible, it is, I've done it before but it now asks me for a passcode and i can't guess it and don't know it, please help

    Before anyone says its not possible, as ive been told many times before, it is, I've done it before but it now asks me for a passcode and i can't guess it and don't know it, please help

    if it keeps asking for the password again just write "0000", add the controller to your favorites, close bluetooth before asked for a password again, and the open bluetooth again

  • Windows swapping over - don't know why.  Help

    Hi,
    usually when I have programs open I can have them all on the screen e.g. I have photoshop open and Safari open and both remain on the screen, one over the other, whichever I am looking at. But all of a sudden, this isn't happening anymore, when I have photoshop open and then I open a Safari window, the Photoshop is snapping off the screen. I don;t know how I've managed to make this happen, but I don't want the programs snapping on and off the screen; any idea how to stop this?
    Thanks.

    It could be that each application is somehow opening separately in one of the Spaces panes. Go to System Preferences/ Spaces and uncheck "Enable Spaces" and see if it still happens after you've done that.
    Rick

  • I keep getting this serious error message... Please help soon! Project deadline is soon

    Hi, I use Premiere Pro on a 2012 Macbook Pro with 16GB DDR3 of memory, 7200rpm hard drive, 2.6 GHz Core i7 processor (dual core).
    I keep getting this error: [/Volumes/BuildDisk/builds/MightySilt/shared/adobe/MediaCore/AudioRenderer/Make/Mac/../.. /Src/AudioRender/AudioPrefetch.cpp-99]
    What causes this? How can I fix it? I'm in a video contest and the deadline is quickly approaching, so I need a fix soon!
    I don't know what causes the error, it started randomly (from what I can tell) and it has happened the last two times I've opened the software. It seems like it has to be something audio related, I just can't figure out what.
    Thanks in advance!

    Hi Thanks,
    I could only see posts from some months ago and thought I had something different.
    Looks like I have not been using the correct search terms.
    Will wait and see what happens.

  • Cannot connect remotely, setup is correct but did not try port mapping, i don,t know how please help

    could someone please point me to the possible areas on my server where i can check why i cannot connect remotely. I have been trying for the past two months without success. i did not tru port mapping cause I don;t know how to do this and I was told that port mapping on my time machine is done automatically. I am running a mac mini lio server 10.7.3 Time capsule.

    Most people are going to see that message as a result of not properly closing Firefox, and then attempting to reopen Firefox. This problem is most likely to occur on Windows Operating systems, less frequently on Linux and Mac systems but not unheard of on any system.
    Because you are on a Mac, I am referring you directly to an article that has been reworded for each operating system.
    : http://kb.mozillazine.org/Kill_application
    To properly close Firefox on your Mac use "Firefox" button -> Quit Firefox, and not with the "X" in corner of window which simply closes the window and not necessarily Firefox.
    When you get stuck as you have described you must Force Firefox to terminate as described at the end of the article:
    Mac OS X
    :Open Apple Menu and select "Force Quit". For Mac OS X 10.3 and later, you can also use the Activity Monitor found in your "Utilities" folder (Applications -> Utilities -> Activity Monitor).
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • Time Machine getting real-only error on 2TB Time Capsule --- Please Help

    Hi,
    My MacPro is running 10.6.2. I bought a 2TB Time Capsule on August 1st, 2009. The TC has been running okay, but painfully slow. On Tuesday, Nov 24th, 2009, the Time Machine reported that the TC is read-only now. I've spent 5 days, including Thanksgiving Day, researching and trying to resolve this problem. To my surprise this problem goes back several years.
    I have tried all the solutions without success. I cannot afford to lose the sparse bundle on TC --- it's 1.56TB in size.
    My home/office LAN includes a Linksys BEFSR81 Router, 2TB Time Capsule, an iMac G5, and my MacPro. That's all there is. The router is connect to the Internet through a Comcast Cable.
    The TC was configured using the Airport Utility. The password is set at the TC level. The password is also set "Guests" (something I found in my research). Wireless is turned off because I'm using an Ethernet LAN.
    Now the following is very Strange!!!
    (1) Click on MacPro in the side bar. The Data disk is shown with a "lock" in the icon. It has only one permission: Everyone "No Access". I'm unable to change the permission.
    (2) Click on the boot drive and make invisible files visible. Expand Volumes. Get Indo on the Data "folder". The permissions are:
    everyone - read/write
    don (Me) - read/write
    admin - read/write
    everyone - read only
    There are 2 "everyone" entries!!! I can't remove either of them. I wonder if the second "everyone" is the problem?
    Does anyone have any suggestions how to fix this read-only problem?
    Is there a bug in the firmware? My TC version is 7.4.2.
    Please help!
    Thank you,
    Don Leckie

    Disk Utility didn't report any errors. I checked the log too.
    The disk "Data" in TimeCapsule can be opened using the Finder.
    The sparsebundle for the MacPro can be opened and each backup folder is accessible and can be written to. But TimeMachine still says that the TimeCapsule is read-only.
    The sparsebundle for the iMac G5 cannot be opened from the Finder. The error message is that I don't have sufficient privileges. Trying from both the MacPro and iMac G5. TimeMachine still says the TimeCapsule is read-only.
    I tried using fsck_hfs to try fixing the permissions. But I got the message that the disk Data was not a character device; whatever that implies.
    Tomorrow I'm putting a call into Apple Support.
    Thank you for your help!

  • HT4623 the Icons on my iphone 4...suddenly get extreemly large, I don't know why.  I can't use the phone when this happens, I have to shut off the phone, which is a problem, just finding the red arrow and making it go across the screen to shut down...help

    does anyone know what is going on with my phone?  I don't think I'm causing this, but you never know.  my home page where the phone, camera, messages, etc...all the icons will get giant....maybe 3 will be on the screen instead of the normal 20.....I have to move the screen around to find what I need to open and then I cannot...so I turn off the phone, when the red arrow appears, and have to hold down one side of the screen to make the arrow move, If I try to slide it over with my finger..........I can't get it to the end.....eventually the phone will shut off and then I turn it on again and the icons are normal....but this happens several times a week and I would like it not to happen , what can I do?

    Thank You, thank You ...so much......that feature made me crazy!  
    Ocean20 wrote:
    This can be turned off in settings/accessibility/zoom. Then on the next screen turn off

  • ORA-00257 error - don't know location of archiver folder

    I am getting an "ORA-00257: archiver error" when trying to connect to a networked database. Please could someone advise on the location the relevant archiving folder so I can attempt to take remedial action.
    The error message additionally states that the "archiver process received an error while trying to archive a redo log".
    Many thanks
    Edited by: 803242 on 02-Nov-2010 02:33

    SQL> set line 1000
    SQL> show parameters log_archive_dest
    NAME TYPE VALUE
    log_archive_dest                     string      /u01/arch
    log_archive_dest_1 string
    log_archive_dest_10 string
    log_archive_dest_2 string
    log_archive_dest_3 string
    log_archive_dest_4 string
    log_archive_dest_5 string
    log_archive_dest_6 string
    log_archive_dest_7 string
    log_archive_dest_8 string
    log_archive_dest_9 string
    NAME TYPE VALUE
    log_archive_dest_state_1 string enable
    log_archive_dest_state_10 string enable
    log_archive_dest_state_2 string enable
    log_archive_dest_state_3 string enable
    log_archive_dest_state_4 string enable
    log_archive_dest_state_5 string enable
    log_archive_dest_state_6 string enable
    log_archive_dest_state_7 string enable
    log_archive_dest_state_8 string enable
    log_archive_dest_state_9 string enable
    SQL>
    Regads
    Asif Kabir

  • Can't even get my iMac and don't know why

    It is fairly impossible for me to find a forum that matches my particular issue. I thought maybe someone here could help me.
    I was attempting to order a refurbished iMac from the apple.com/ca/ as I live in Canada. I don't have much money so any little bit helps and the $200 savings meant I could actually afford to replace my aging G4 Mac mini. The refurbished iMac I picked out was quoted online at $1099 canadian, the same unit is $999 on the American site. When I placed my order including all recycling fees and shipping I was quoted $1156 and with my tax rate that came to $1213.80. Which was just enough for me to afford. I was going to finally get that new iMac I've longed for. Sadly my order was declined. I promptly contacted my bank to find out what had gone they informed I had been charged $1346 because of exchange rate on the order I was making. Exchange rate on a price quoted in Canadian dollars??? I then contacted Apple sales by phone and told them my issue and they informed that all those prices are in Canadian funds and they too tried to place my order and once again it was declined and no one not the rep I was talking to not his support staff could explain why apple was charging an exchange rate on something that is clearly advertised in Canadian Dollars. In fact if this is an accurate cost it would mean that Apple is selling me a refurbished computer at the cost of a brand new Apple Computer but how am I even to trust that price to be accurate too. I feel deeply wronged here and lied to.

    Welcome to the Apple Discussions!
    Unfortunately, this is a user to user technical help forum. This is not a site where you make contact with Apple. Nor is there anything that any of us here can do to change this.
    What bank? Is this a Canadian or US bank?
    Dah•veed

  • Cannot find symbol error. don't know why

    Hello, I'm trying to write a button bean in the shape of a triangle but netbeans keeps throwing up a cannot find symbol error at my g.fillPolygon line. I've declared the number of sides and x and y coords.
    Any ideas as to why this is happening would be greatly appreciated.
    Here's the code:
    package trianglebutton;
    import java.util.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    public class TriangleButtonBean extends JButton implements Serializable
    private TriangleButtonBean graphicPolygon;
    private Color buttonColour;
    private Color textColour;
    private String caption;
    private int sides = 3;
    private int size = 30;
    private int centerX = 100;
    private int centerY = 100;
         public TriangleButtonBean()
              super();
              setPreferredSize(new Dimension(50,50));
              setBorder(null);
              buttonColour = Color.red;
              textColour = Color.black;
              caption = "";
         public TriangleButtonBean(String acaption)
              super();
              setPreferredSize(new Dimension(50,50));
              setBorder(null);
              caption = acaption;
         public void paintComponent(Graphics g)
    String astring;
              super.paintComponent(g);
    g.setColor(buttonColour);
              int centerX = graphicPolygon.getCenterX(); //Invoking getCenterX method
              int centerY = graphicPolygon.getCenterY(); //Invoking getCenterY method
              //int Xcoordinates [] = graphicPolygon.getPolygonXCoordinates(sides,size);
              //int Ycoordinates [] = graphicPolygon.getPolygonYCoordinates(sides,size);
    g.drawPolygon(centerX,centerY, sides); //Draw polygon using xcoord,ycoord and number of sides
              g.fillPolygon(centerX,centerY, sides); //Fill poly
              g.setColor(textColour);
              if (caption.length() > 1)
                   astring = caption.substring(0,1);
              else
                   astring = caption;
              g.drawString(astring,22,27);
         public void setButtonColour(Color acolour)
              buttonColour = acolour;
              repaint();
         public Color getButtonColour()
              return buttonColour;
         public void setTextColour(Color acolour)
              textColour = acolour;
              repaint();
         public Color getTextColour()
              return textColour;
         public void setCaption(String acaption)
              caption = acaption;
              repaint();
         public String getCaption()
              return caption;
    // public void setCenterX(int xcoords)
    // centerX = xcoords;
    public int getCenterX()
    return centerX;
    // public void setCenterY(int ycoords)
    // centerY = ycoords;
    public int getCenterY()
    return centerY;
    public static void main(String[] args){
    TriangleButtonBean agui = new TriangleButtonBean();
    } // End of class

    Please READ, STUDY, and UNDERSTAND the error messages, they are telling you exactly what the problem is:
    . . .\TriangleButtonBean.java:56: cannot find symbol
    symbol  : method drawPolygon(int,int,int)
    location: class java.awt.Graphics
    g.drawPolygon(centerX,centerY, sides); //Draw polygon using xcoord,ycoord and number of sides
    ^
    . . .\TriangleButtonBean.java:57: cannot find symbol
    symbol  : method fillPolygon(int,int,int)
    location: class java.awt.Graphics
    g.fillPolygon(centerX,centerY, sides); //Fill poly
    ^
    2 errors
    Process javac exited with code 1In both cases the messages ar telling you that the methods
    drawPolygon(int,int,int)
    method fillPolygon(int,int,int)
    can't be found in java.awt.Graphics
    And if you look at the documentation, you see that is indeed the problem - the first two arguments are int arrrays, not int.
    Fix the method signature or use something else.

  • I am unable to to publish to BC i keep getting a type error:  Don't know how to generate rendered data for type.  Can someone help me fix this?

    Been having this problem all day now. i just installed the new version

    Can you please send an email to us at [email protected] along with a link to this thread and the .muse file? You can upload it to Adobe Send or Dropbox and include a download link. Thanks!

  • Crystal Report 13- self generated error :: Don't just ignore,Please help!

    I was planning to develop this desktop application with VB.net 2010, SQL 2008 and Crystal Reports. I have downloaded the latest "SAP Crystal Reports, version for Visual Studio 2010". I faced some problems ...some error. I read on a [thread |Re: CRYSTAL Reports 2010 for VS 2010 issues; about changing the target framework from the Project>Properties>Compile>Advanced Compile Properties> from framework 4.0 client profile to framework 4.0, then the errors were gone but different errors occurred in the CrystalReport1.vb file. What got me confused is ... how come the errors come without me not even editing or writing the code, it was generated by VS 2010 itself. I've posted the code and the error below (It looks hard to read, I guess SAP has to change its text editor). I tried to look for solutions for the errors but couldn't get them. I hope this would be the right place to get the solution. Thank you in advance!
    Mike F.
    Edited by: mk1987 on Feb 19, 2011 4:49 PM
    There is a 2500 character limit and then Forums removes formatting.
    Edited by: Don Williams on Feb 19, 2011 5:51 PM

    +++CODE+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ' <auto-generated>
    '     This code was generated by a tool.
    '     Runtime Version:4.0.30319.1
    '     Changes to this file may cause incorrect behavior and will be lost if
    '     the code is regenerated.
    ' </auto-generated>
    Option Strict Off
    Option Explicit On
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.ReportSource
    Imports CrystalDecisions.CrystalReports
    Imports CrystalDecisions.Data
    Imports CrystalDecisions.Enterprise
    Imports CrystalDecisions.ReportAppServer
    Imports CrystalDecisions.Reporting
    Imports CrystalDecisions.VSDesigner
    Imports CrystalDecisions.Web
    Imports CrystalDecisions.Windows
    Imports WindowsApplication1.CrystalReport1
    Imports WindowsApplication1.CrystalDecisions
    Imports WindowsApplication1.CachedCrystalReport1
    Imports WindowsApplication1.ReportClass
    Imports CrystalDecisions.Shared
    Imports System
    Imports System.ComponentModel
    Public Class CrystalReport1
        Inherits ReportClass
        Public Sub New()
            MyBase.New()
        End Sub
        Public Overrides Property ResourceName() As String
            Get
                Return "CrystalReport1.rpt"
            End Get
            Set(ByVal value As String)
                'Do nothing
            End Set
        End Property
        Public Overrides Property NewGenerator() As Boolean
            Get
                Return True
            End Get
            Set(ByVal value As Boolean)
                'Do nothing
            End Set
        End Property
        Public Overrides Property FullResourceName() As String
            Get
                Return "WindowsApplication1.CrystalReport1.rpt"
            End Get
            Set(ByVal value As String)
                'Do nothing
            End Set
        End Property
        <Browsable(False), _
         DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
        Public ReadOnly Property Section1() As CrystalDecisions.CrystalReports.Engine.Section
            Get
                Return Me.ReportDefinition.Sections(0)
            End Get
        End Property
        <Browsable(False), _
         DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
        Public ReadOnly Property Section2() As CrystalDecisions.CrystalReports.Engine.Section
            Get
                Return Me.ReportDefinition.Sections(1)
            End Get
        End Property
        <Browsable(False), _
         DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
        Public ReadOnly Property Section3() As CrystalDecisions.CrystalReports.Engine.Section
            Get
                Return Me.ReportDefinition.Sections(2)
            End Get
        End Property
        <Browsable(False), _
         DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
        Public ReadOnly Property Section4() As CrystalDecisions.CrystalReports.Engine.Section
            Get
                Return Me.ReportDefinition.Sections(3)
            End Get
        End Property
        <Browsable(False), _
         DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
        Public ReadOnly Property Section5() As CrystalDecisions.CrystalReports.Engine.Section
            Get
                Return Me.ReportDefinition.Sections(4)
            End Get
        End Property
    End Class

  • Trying restore my phone after the update and it's asking for a backup file password that I don't know.  Please help!

    After installing the latest update from apple my iPhone 4 will not complete the restore process with out a backup password.  I don't recall ever setting up a backup password and there is no help button if you can't find the password.  Apparently I'll loose all my data and have to set the phone up as a new phone.  This is very frustrating.

    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
     Cheers, Tom

Maybe you are looking for

  • After 10.9.4 Update, two finger scrolling not working in any App

    I have all the right settings selected in System Preferences. Tried restarting the computer a couple times. I can't figure out why it is happening. Thanks for the help!

  • Sql query usig round and decode together

    can i get one sql quer for returning whole number using round and decode function eg: the value 47 if value=47 then the query should return 50 if the value =44 then the quer should return 40 pls give me sql query for above example using round and dec

  • Problem in installing 10g R2 on Windows 2003 Server

    Dear all, We have a great problem when trying to install Oracle Standard Edition 10g to Windows 2003 Server. The procedure begins fine but at some point it stops (around 17% - 20%) without any Error Window. The install actions log finishes like that:

  • Problem with Function returned without value  -

    all i am having a problem w/ jdev passing the values. when hardcoded it works. when i remove to pass the 2 vals for doc_type and doc_num the params are being passed to the impl but the String sql = " BEGIN :5 := scotts_test_proc.get_log(:1, :2, :3, :

  • No Document Opened

    Hi all, I got a problem with opening and creating new document in SOLAR01. Each time I create, or try to open a document, nothing displayed in SAP editor (no template, no doc display) for any Office document. It prompts "No document opened" Previousl