SQL Error "then" error

I am running this script in Crystal Reports, and I receive a "then" is missing error.
if {tblProjectPhaseAssignments.ExpectedCompletionDate}
< CurrentDate and
{tblProjectPhaseAssignments.ActualCompletionDate}
isnull then "LATE!"
If expected completion date is less than the current date and the actual completion date is blank, print LATE.

Try this instead:
if {tblProjectPhaseAssignments.ExpectedCompletionDate} < CurrentDate
    and isnull({tblProjectPhaseAssignments.ActualCompletionDate})
then "LATE!"
Fuskie
Who is presuming this is in Crystal Syntax...

Similar Messages

  • When I open SQL Plus then give this error

    Hi Master,
    Sir i install oracle 8i and run but next day i open my SQL Plus then give this error
    ORA-01034 : oracle not available
    ORA-27101 : Shared memory realm does not exist
    please give me idea
    thanking you
    Amir

    I presume you are using Windows, so in Control Panel -> Services, start the Oracle service, and also start the instance, if not started.

  • Java.sql.SQLException: General error

    Hi i got this error message:
    java.sql.SQLException: General error
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
    at PersonFrame.actionPerformed(PersonFrame.java:1155)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
    n Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
    ce)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    my code is:
    while (rs.next())
    String recnumber = rs.getString("Person_ Record_ Number");
    int reccc=Integer.parseInt(recnumber);
    if (Integer.parseInt(FamilyTree.rowselected)==reccc && AddPersonn!=0)
    System.out.println ("record in table "+reccc);
    System.out.println ("record selected "+FamilyTree.rowselected);
    str.executeUpdate("INSERT INTO Person " +
    "VALUES ('"+nameofperson.getText()+"','"+SurnameOfPersonTxt.getText()+"','"+Bday+"','EMPTY','"+DateOfDeathTogether+"','EMPTY','EMPTY','"+phone+"','"+genre+"','"+Country+"','"+FamilyTree.rowselected+"','"+Nicknametxt.getText()+"','"+Filename+"','"+BioFile+"','"+city+"','"+postal+"','EMPTY','empty','"+TimeOfBirth+"','EMPTY')");
    setVisible(false);
    System.out.println(Filename);
    LINE 1155 that the error message says is line :str.executeUpdate("INSERT INTO Person " +
    <<<PersonFrame.actionPerformed(PersonFrame.java:1155)>>>>>
    also note that i didn't include a try statement here (int reccc=Integer.parseInt(recnumber) because recnumber since is created holds the value 5000 so there is no need
    Also the output.. of
    System.out.println("INSERT INTO Person " + "VALUES ('"+nameofperson.getText()+"','"+SurnameOfPersonTxt.getText()+"','"+Bday+"','EMPTY','"+DateOfDeathTogether+"','"+PlaceOfDeath+"','"+address+"','"+phone+"','"+genre+"','"+Country+"','"+FamilyTree.rowselected+"','"+Nicknametxt.getText()+"','"+Filename+"','"+BioFile+"','"+city+"','"+postal+"','"+Causeofdeath+"','"+PlaceBurried+"','"+TimeOfBirth+"','EMPTY')");
    is:
    INSERT INTO Person VALUES ('fgfgff','dfdgfd','2/1/1988','EMPTY','Person Is Alive','null','EMPTY','EMPTY','Male','EMPTY','0560','dasfds','EMPTY','EMPTY','EMPTY','EMPTY','null','null','EMPTY','EMPTY')
    and my table gets only text values...
    Any Help Will Be Greately Appreciated
    Thanks
    Nick .s

    You cannot do two thing at the same time with the same statement (while your ResultSet is open you are making an insert), try using a separate Statement that the one you used for the query for the insert. If that doesn't work, make a new connection, that will do it.
    If you were using a separate statement then I'm sorry, I couldn't tell from your code. I'd had a similar problem and that's the way I solved it.

  • EXCEL TO SQL USING SSIS Error

    I have an .XLSLX File.  I have a DFD Task to export that xlsx file into SQL. I use SSIS 2008. However when I run the package, it fails with this error below.
    [Connection manager "Excel Connection Manager"] Error: SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available.

    Hi Desigal59,
    The BIDS is a 32-bit software, therefore, only 32-bit providers are visible in the IS design GUI. So, you need the 32-bit Microsoft ACE OLE DB Provider to be installed on your local machine to create the package (using OLE DB Source instead of Excel Source
    in the Data Flow Task). If 32-bit Office 2007 or higher is installed on your local machine, the 32-bit Microsoft ACE OLE DB drivers have been installed already, otherwise, you need to install the 32-bit Microsoft Access Database Engine 2010 Redistributable.
    To run the package in 64-bit runtime mode, you need the 64-bit Microsoft ACE OLE DB Provider. However, the 32-bit and 64-bit Microsoft Access Database Engine Redistributable cannot be installed side by side on a single server. So, if you have 32-bit Office
    installed on your local server, you can install the 64-bit Microsoft Access Database Engine 2010 Redistributable and run the package in 64-bit runtime mode in BIDS by setting the Run64BitRuntime property to True. If 32-bit Office is not installed, you have
    to install only the 32-bit
    Microsoft Access Database Engine 2010 Redistributable and cannot run the package in 64-bit runtime mode in BIDS.
    After deploying the package to the SSIS server, if you want it to run in 64-bit runtime mode, you only need to make sure the 64-bit Microsoft ACE OLE DB drivers are installed and the 32-bit drivers are not necessary.
    Another way to create the package is use the 64-bit SQL Server Import and Export Wizard in which the 64-bit Microsoft ACE OLE DB Provider is available. Then, you can save it as a package to the file system from the SQL Server Import and Export Wizard. In this
    way, you don’t need the 32-bit Microsoft ACE OLE DB drivers to develop the package. When you open the package in BIDS, you may encounter errors or the OLE DB Connection Manager works offline, but you can ignore the error and run the package successfully only
    if you have 64-bit ACE OLE DB drivers installed on your computer.
    Regards,
    Mike Yin
    TechNet Community Support

  • SQL Server monitoring error event log 4001

    hello Experts ,
    We have SCOM 2012 R2 environment ,I have installed SQL SERVER MPs 6.5.0.1 and installed SCOM agent on some of SQL Server. Some of the SQL Server are monitoring working properly not all SQL Server but getting error  for some of SQL Server in event log
    Event :4001
    Management Group: SCOMMgtGroup. Script: Main Module: CPUUsagePercentDataSource.ps1 : 
    Computer Name = 'MHSSCOM01.memnet.org' WMI = 'ComputerManagement11' Service Name = 'MSSQLSERVER' SQL Instance Name = 'MSSQLSERVER'
    Exception calling "Fill" with "1" argument(s): "The user does not have permission to perform this action."Error occured during CPU Usage for SQL Instances data source executing.
    Computer:MHSSCOM01 
    Reason: Exception calling "Fill" with "1" argument(s): "The user does not have permission to perform this action."
    also not getting Database information within the SQL Server instances for these SQL Server within "Instances Summary "
    for resolution ,I have created a Run as account (windows)for SQL monitoring then associated it with Run as profile with SQL Server default account,Discovery account and Monitoring account and distribute it securely to each SQL Server health service object
    .The run as account have  added to local admin group on each SQL server.
    How to resolved the event log error and how to get database information for all instances of sql server.
    Thanks
    RICHA

    Hi,
    It seems like that the action account that run the script does not have enough permissions on the monitored SQL server, I would like to suggest you follow the below link to check your runas account configuration:
    http://blogs.technet.com/b/kevinholman/archive/2010/09/08/configuring-run-as-accounts-and-profiles-in-r2-a-sql-management-pack-example.aspx
    And make sure the action account also have SQL admin account to the SQL server.
    Here is also a link that may be helpful for you:
    http://blogs.technet.com/b/momteam/archive/2014/05/12/kb-event-4001-in-the-operations-manager-log-during-sql-server-2012-monitoring.aspx
    Regards,
    Yan Li
    Regards, Yan Li

  • XML PL/SQL Parser Demo Error ORA-29516

    I'm trying to get the XML Plsql demo to work on the following
    system:
    Sun Solaris 8
    Oracle 8.1.7.0.0 64 bit
    using the $ORACLE_HOME/xdk/plsql/demo files
    I created an oracle user "xmldba" , granted javauserpriv to
    xmldba, granted javasyspriv to xmldba. I have run
    $ORACLE_HOME/xdk/plsql/parser/bin/load.sql. Then I try the
    demo -
    oracle8$ sqlplus xmldba/xmldba
    SQL*Plus: Release 8.1.7.0.0 - Production on Fri Nov 16 11:07:44
    2001
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.0.0 - 64bit Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - 64bit Production
    SQL> @domsample
    Procedure created.
    No errors.
    SQL> execute domsample
    ('/home/oracle8/app/oracle/product/8.1.7/xdk/plsql/demo','family.
    xml','errors.txt');
    BEGIN domsample
    ('/home/oracle8/app/oracle/product/8.1.7/xdk/plsql/demo','family.
    xml','errors.txt'); END;
    ERROR at line 1:
    ORA-29516: Aurora assertion failure: Assertion failure at
    joncomp.c:127
    jtc_active_clint_init_ncomp_slots(oracle/xml/parser/v2/DTD, 0)
    returned 0
    ORA-06512: at "XMLDBA.XMLPARSERCOVER", line 0
    ORA-06512: at "XMLDBA.XMLPARSER", line 57
    ORA-06512: at "XMLDBA.DOMSAMPLE", line 72
    ORA-06512: at line 1
    Anyone have any ideas on what I might be missing or what could
    cause the problem?
    Thanks,
    Rhea

    These errors were due to not running initjvm etc. I have resolved all the jvm sqlj related problems now .
    I am still seeing resolver errors . Opened a new thread for those errors.
    Please respond on those
    Thanks
    null

  • SQL*Loader-930: Error parsing insert statement for column

    we upload data on daily basis in application throug apps user and these table are invloved
    1. DEV_RA_INTERFACE_LINES_ALL(owner is a apps)
    2.RA_INTERFACE_LINES_ALL(owner is a AR)
    we do steps
    1 delete record from DEV_RA_INTERFACE_LINES_ALL table
    2 delete record from      RA_INTERFACE_LINES_ALL table
    3 load data using sql loader with apps user
    4 insert in RA_INTERFACE_LINES_ALL table
    we want to change user i mean these step do dataupload user not apps
    we give the proper rights to dataupload like select,delete and insert rights on these table to dataupload user but when i going to load data throug sql loader we receive error
    SQL*Loader-930: Error parsing insert statement for column APPS.DEV_RA_INTERFACE_
    LINES_ALL.ORIG_SYSTEM_BILL_ADDRESS_ID.
    ORA-00904: "F_ORIG_SYSTEM_BILL_ADDR_REF": invalid identifier
    and if i insert data through apps then done.

    make sure that u have no speces left
    between lines.
    give the path of control file path correctly.

  • Sql server connection error

    Hi All,
    I am pulling data from SQL server(view) using WCF-SQL adapter, in DEV it's working fine and in test following is the error
    I have checked the credentials and server name all are fine, But i couldn't figure out the issue.
    Thanks in Advace
    Recloc_WCFSQL
    mssql://SQLSERVERTest/biztalkdb?InboundId=xyz
    WCF-SQL
    Microsoft.ServiceModel.Channels.Common.ConnectionException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that
    SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing
    a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance
    Specified) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock,
    Boolean asyncClose) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo
    serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer
    timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString
    connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
    options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection
    owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout,
    Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions
    userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&
    connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection
    outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1
    retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Adapters.Sql.SqlAdapterConnection.OpenConnection() --- End of inner exception stack trace --- at Microsoft.Adapters.Sql.SqlAdapterConnection.OpenConnection() at Microsoft.Adapters.Sql.ASDKConnection.Open(TimeSpan
    timeout) at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout) at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout,
    MetadataLookup metadataLookup, String& connectionId) at Microsoft.ServiceModel.Channels.Common.Channels.AdapterChannelListener`1.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan
    timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint.Enable()
    at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint..ctor(BizTalkEndpointContext endpointContext, IBTTransportProxy transportProxy, ControlledTermination control) at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiver`2.AddReceiveEndpoint(String url,
    IPropertyBag adapterConfig, IPropertyBag bizTalkConfig)

    The first few things to check would be
    Is TCP/IP Protocol enabled on the Test SQL Server Instance?
    If it is configured is it running on the default port or a different port has been specified? In case a different port has been specified then your configuration URI should reflect that OR the SQLBrowser service needs to be running
    The MS DTC configuration on the SQL Server need to have been configured with BOTH inbound/outbound enabled (Component Management - DTC)
    The Windows Firewall on the BizTalk Server Test should be a) disabled or b) configured to permit connection to the SQL Server on either 1433 or the specific instance port.
    Regards.

  • SQL*Loader-925: Error while uldlfca: OCIStmtExecute (ptc_hp)

    Hi my table loading is failing with the floowing error. But same table is loading daily without any problem. I tried again but failed with the same message.
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    SQL*Loader-925: Error while uldlfca: OCIStmtExecute (ptc_hp)
    ORA-03114: not connected to ORACLE
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    SQL*Loader-925: Error while uldlgs: OCIStmtExecute (ptc_hp)
    ORA-03114: not connected to ORACLE
    SQL*Loader-925: Error while uldlgs: OCIStmtFetch (ptc_hp)
    ORA-24338: statement handle not executed
    How to solve this problem?
    Thanks
    Prashanth

    user614414 wrote:
    Hi BluShadow,
    Nothing is changed recently. Loading is happening for other files at sametime, when this loading is failed. I have renamed and recreated the table, then it is working fine. similar problem occured today for some other table.
    May i know, for any other reason it will happen?You've only supplied us with an error message and that's what the error message indicates.
    If you want more help, you need to supply more details.

  • SQL*Loader-929: Error

    Hi
    I am getting following error
    SQL*Loader-929: Error parsing insert statement for table XXEEG.XXCONV_NOR_OKS_CON_HEADERS.
    ORA-00947: not enough values
    while running SQL*Loader. I have same number and types of columns in target table, data file and in control file even after I am getting this error. One thing I want to mention is that there are some fields in my data file which are NULL. But I think this should not create any problem.
    Please If any one can give the answer then it will be very helpful for me.

    Hi,
    I am generating control file using a shell script and that shell script runs SQL*LOADER using that generated control file. The following control file is generating.
    Control file:
    OPTIONS (SKIP=1)
    load data
    INFILE '/home/C9976680/xxconv_nordic_oks_header.csv'
    TRUNCATE
    into table xxeeg.XXCONV_NOR_OKS_CON_HEADERS
    fields terminated by "," optionally enclosed by '"' trailing nullcols
    ID "xxconv_nordic_contract_pkg.get_seq_val('HDR')",
    BATCH_NUMBER "xxconv_nordic_contract_pkg.get_batch_no(to_date(:START_DATE,'MM/DD/YYYY'),to_date(:END_DATE,'MM/DD/YYYY'))",
    CONTRACT_NUMBER,
    CONTRACT_VERSION,
    ORACLE_CONTRACT_NUMBER "xxconv_nordic_contract_pkg.get_orcl_kno(:CONTRACT_NUMBER,CONTRACT_VERSION))",
    START_DATE "to_date(:START_DATE,'MM/DD/YYYY')",
    END_DATE "to_date(:END_DATE,'MM/DD/YYYY')",
    STATUS,
    PARTY_ID,
    BILL_TO_ID,
    SHIP_TO_ID,
    ACCOUNTING_RULE_TYPE,
    INVOICE_RULE_TYPE,
    PAYMENT_TERMS,
    INT_SALESREP_NAME,
    EXT_SALESREP_NAME,
    RENEWAL_CONTACT_NAME,
    ISR_ZONE,
    ORBITAL_PROFILE_ID,
    CCHOLDER_NAME,
    CC_ZIP,
    CUST_PO,
    CC_NO,
    CC_EXPIRY_DATE,
    ERROR_MESSAGE,
    INTERFACED_STATUS_FLAG CONSTANT "N",
    ERROR_STACK
    Log file:
    SQL*Loader: Release 8.0.6.3.0 - Production on Wed Feb 13 02:01:11 2008
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Control File: /opt/egapmdev/ebmdappl/xxeeg/bin/xxconv_nordic_oks_header.ctl
    Data File: /home/C9976680/xxconv_nordic_oks_header.csv
    Bad File: /opt/egapmdev/ebmdappl/xxeeg/bin/xxconv_nordic_oks_header.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 1
    Errors allowed: 50
    Bind array: 64 rows, maximum of 65536 bytes
    Continuation: none specified
    Path used: Conventional
    Table XXEEG.XXCONV_NOR_OKS_CON_HEADERS, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
    TRAILING NULLCOLS option in effect
    Column Name Position Len Term Encl Datatype
    ID FIRST * , O(") CHARACTER
    BATCH_NUMBER NEXT * , O(") CHARACTER
    CONTRACT_NUMBER NEXT * , O(") CHARACTER
    CONTRACT_VERSION NEXT * , O(") CHARACTER
    ORACLE_CONTRACT_NUMBER NEXT * , O(") CHARACTER
    START_DATE NEXT * , O(") CHARACTER
    END_DATE NEXT * , O(") CHARACTER
    STATUS NEXT * , O(") CHARACTER
    PARTY_ID NEXT * , O(") CHARACTER
    BILL_TO_ID NEXT * , O(") CHARACTER
    SHIP_TO_ID NEXT * , O(") CHARACTER
    ACCOUNTING_RULE_TYPE NEXT * , O(") CHARACTER
    INVOICE_RULE_TYPE NEXT * , O(") CHARACTER
    PAYMENT_TERMS NEXT * , O(") CHARACTER
    INT_SALESREP_NAME NEXT * , O(") CHARACTER
    EXT_SALESREP_NAME NEXT * , O(") CHARACTER
    RENEWAL_CONTACT_NAME NEXT * , O(") CHARACTER
    ISR_ZONE NEXT * , O(") CHARACTER
    ORBITAL_PROFILE_ID NEXT * , O(") CHARACTER
    CCHOLDER_NAME NEXT * , O(") CHARACTER
    CC_ZIP NEXT * , O(") CHARACTER
    CUST_PO NEXT * , O(") CHARACTER
    CC_NO NEXT * , O(") CHARACTER
    CC_EXPIRY_DATE NEXT * , O(") CHARACTER
    ERROR_MESSAGE NEXT * , O(") CHARACTER
    ERROR_STACK NEXT * , O(") CHARACTER
    INTERFACED_STATUS_FLAG CONSTANT 'N'
    Column ID had SQL string
    "xxconv_nordic_contract_pkg.get_seq_val('HDR')"
    applied to it.
    Column BATCH_NUMBER had SQL string
    "xxconv_nordic_contract_pkg.get_batch_no(to_date(:START_DATE,'MM/DD/YYYY'),to_date(:END_DATE,'MM/DD/YYYY'))"
    applied to it.
    Column ORACLE_CONTRACT_NUMBER had SQL string
    "xxconv_nordic_contract_pkg.get_orcl_kno(:CONTRACT_NUMBER),to_char(:CONTRACT_VERSION))"
    applied to it.
    Column START_DATE had SQL string
    "to_date(:START_DATE,'MM/DD/YYYY')"
    applied to it.
    Column END_DATE had SQL string
    "to_date(:END_DATE,'MM/DD/YYYY')"
    applied to it.
    SQL*Loader-929: Error parsing insert statement for table XXEEG.XXCONV_NOR_OKS_CON_HEADERS.
    ORA-00947: not enough values
    Table Structure:
    CREATE TABLE XXEEG.XXCONV_NOR_OKS_CON_HEADERS
    ( ID NUMBER CONSTRAINT HEAD_ID_PK PRIMARY KEY,
    BATCH_NUMBER NUMBER,
    CONTRACT_NUMBER VARCHAR2(50),
    CONTRACT_VERSION NUMBER,
    ORACLE_CONTRACT_NUMBER VARCHAR2(300),
    START_DATE varchar2(20),
    END_DATE varchar2(20),
    STATUS VARCHAR2(20),
    PARTY_ID NUMBER,
    BILL_TO_ID NUMBER,
    SHIP_TO_ID NUMBER,
    ACCOUNTING_RULE_TYPE VARCHAR2(50),
    INVOICE_RULE_TYPE VARCHAR2(50),
    PAYMENT_TERMS VARCHAR2(50),
    INT_SALESREP_NAME VARCHAR2(50),
    EXT_SALESREP_NAME VARCHAR2(50),
    RENEWAL_CONTACT_NAME VARCHAR2(50),
    ISR_ZONE VARCHAR2(50),
    ORBITAL_PROFILE_ID VARCHAR2(50),
    CCHOLDER_NAME VARCHAR2(50),
    CC_ZIP NUMBER,
    CUST_PO VARCHAR2(50),
    CC_NO NUMBER,
    CC_EXPIRY_DATE varchar2(20),
    ERROR_MESSAGE VARCHAR2(1000),
    INTERFACED_STATUS_FLAG VARCHAR2(1),
    ERROR_STACK VARCHAR2(2000)
    Functions used above:
    FUNCTION get_batch_no(p_start_date DATE, p_end_date DATE) RETURN NUMBER IS
    BEGIN
    RETURN 1;
    END get_batch_no;
    FUNCTION get_orcl_kno(p_contract_number VARCHAR2, p_contract_version NUMBER) RETURN VARCHAR2 IS
    BEGIN
    RETURN 'M'||p_contract_number||'v'||p_contract_version;
    END get_orcl_kno;
    FUNCTION get_seq_val (p_seqtype VARCHAR2) RETURN NUMBER IS
    v_seqno NUMBER;
    BEGIN
    IF UPPER(p_seqtype) = 'HDR' THEN
    SELECT XXCONV_NOR_HDR_S.NEXTVAL
    INTO v_seqno
    FROM dual;
    RETURN v_seqno;
    END IF;
    IF UPPER(p_seqtype) = 'LINE' THEN
    SELECT XXCONV_NOR_LINE_S.NEXTVAL
    INTO v_seqno
    FROM dual;
    RETURN v_seqno;
    END IF;
    IF UPPER(p_seqtype) = 'SUBLINE' THEN
    SELECT XXCONV_NOR_SUBLINE_S.NEXTVAL
    INTO v_seqno
    FROM dual;
    RETURN v_seqno;
    END IF;
    IF UPPER(p_seqtype) = 'BILL_SCH' THEN
    SELECT XXCONV_NOR_BILL_SCH_S.NEXTVAL
    INTO v_seqno
    FROM dual;
    RETURN v_seqno;
    END IF;
    IF UPPER(p_seqtype) = 'PMS' THEN
    SELECT XXCONV_NOR_PMS_S.NEXTVAL
    INTO v_seqno
    FROM dual;
    RETURN v_seqno;
    END IF;
    IF UPPER(p_seqtype) = 'TEST' THEN
    SELECT XXCONV_NOR_WARRANTY_S.NEXTVAL
    INTO v_seqno
    FROM dual;
    RETURN v_seqno;
    END IF;
    END get_seq_val;
    -----------------------------------

  • How to catch PL/SQL: ORA-04052 error?

    I need to execute a procedure that select remote objects but the remote db is a RAC DB and I only have access to one of the nodes, the remote RAC have load balancing enabled and the remote DBA can’t create a DB Service for my connection, so, I have to re-run the execution of my procedure until it connects successful to the remote DB through a db link, but I can’t catch the error ORA-12541: TNS:no listener.
    Someone knows how to catch the error??
    set serveroutput on
    declare
    function F_DATE return sysdate
    is
    ld_return date;
    begin
    begin
    select sysdate into ld_return from dual@dbl_bnvalores;
    exception
    when others then
    ld_return := f_date;
    end;
    return ld_return;
    end F_DATE;
    begin
    dbms_output.put_line('Remote sysdate: '||f_date);
    end;
    Error at line 2
    ORA-06550: line 2, column 26:
    PLS-00562: a function must return a type.
    ORA-06550: line 7, column 42:
    PL/SQL: ORA-04052: error occurred when looking up remote object BNSAFI.DUAL@DBL_BNVALORES
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12541: TNS:no listener
    ORA-06550: line 7, column 7:
    PL/SQL: SQL Statement ignored

    I could confirm that you would never branch to the exception in case of no listener!
    So another possibility that comes to mind is to enclose the remote select in an execute immediate and only execute it if you could establish a connection via UTL_TCP:
    Something along those lines:
    michaels>  DECLARE
       conn               UTL_TCP.connection;
       l_date             DATE;
       no_listner_excep   EXCEPTION;
       PRAGMA EXCEPTION_INIT (no_listner_excep, -29260);
    BEGIN
       conn := UTL_TCP.open_connection ('fleet', 1569);
       EXECUTE IMMEDIATE 'select sysdate from dual@fleet_new'
                    INTO l_date;
       UTL_TCP.close_connection (conn);
       DBMS_OUTPUT.put_line (l_date);
    EXCEPTION
       WHEN no_listner_excep
       THEN
          DBMS_OUTPUT.put_line (SQLERRM (SQLCODE));
    END;
    ORA-29260: network error: TNS:no listener
    PL/SQL procedure successfully completed.

  • Java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMFAIL start() failed on resource 'myDomain': XAER_RMFAIL : Resource manager is unavailable

    Hi All,
    I am facing below issue without any change in the config from weblogic
    Managed servers are coming up and running without any issue
    But when we are doing any operation from application then its failing
    java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMFAIL start() failed on resource 'myDomain': XAER_RMFAIL : Resource manager is unavailable
    Regards
    Lokesh

    Hi,
    Can you please try increase the below MaxXACallMillis setting in Weblogic set 'Maximum Duration of XA Calls' to a bigger value
    MaxXACallMillis: Sets the maximum allowed duration (in milliseconds) of XA calls to XA resources. This setting applies to the entire domain.
    http://docs.oracle.com/cd/E12840_01/wls/docs103/jta/trxcon.html
    The parameter is exposed through administration console: services --> jta --> advanced --> "Maximum Duration of XA Calls:"
    Check the below docs for more information
    WLS 10.3: Intermittent XA error: XAResource.XAER_RMERR (Doc ID 1118264.1)
    Hope it Helps

  • Java.sql.SQLException: Internal Error: at oracle.sql.ARRAY.getArray(ARRAY.j

    hi all,
    I am getting the below exception
    Basically i am registering an out parameters like this
    cs.registerOutParameter(4, Types.ARRAY, "ISSUESECTION_LIST");
    my database version: oracle 11.1.0.7.0.
    I have created a synonym and given the execute privileges ,but also it comes up with the below exception
    java.sql.SQLException: Internal Error
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.initCollElemTypeName(OracleTypeCOLLECTION.java:1026)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.getAttributeType(OracleTypeCOLLECTION.java:1056)
    at oracle.jdbc.oracore.OracleNamedType.getFullName(OracleNamedType.java:110)
    at oracle.jdbc.oracore.OracleTypeADT.createStructDescriptor(OracleTypeADT.java:2262)
    at oracle.jdbc.oracore.OracleTypeADT.unpickle81(OracleTypeADT.java:1656)
    at oracle.jdbc.oracore.OracleTypeUPT.unpickle81UPT(OracleTypeUPT.java:466)
    at oracle.jdbc.oracore.OracleTypeUPT.unpickle81rec(OracleTypeUPT.java:416)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle81_imgBody_elems(OracleTypeCOLLECTION.java:979)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle81_imgBody(OracleTypeCOLLECTION.java:923)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle81(OracleTypeCOLLECTION.java:743)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION._unlinearize(OracleTypeCOLLECTION.java:242)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unlinearize(OracleTypeCOLLECTION.java:208)
    at oracle.sql.ArrayDescriptor.toJavaArray(ArrayDescriptor.java:963)
    at oracle.sql.ARRAY.getArray(ARRAY.java:370)
    at com.db.gmr.eds.sm.jdbc.IssueSectionStoreJDBC.getResources(IssueSectionStoreJDBC.java:69)
    at com.db.gmr.eds.handler.GetResources.handle(GetResources.java:126)
    at com.db.gmr.eds.servlet.PageController.handle(PageController.java:138)
    at com.db.gmr.eds.servlet.PageController.doGet(PageController.java:80)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at com.db.gmr.core.servlet.filters.TomcatParameterBugFix.doFilter(TomcatParameterBugFix.java:65)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:500)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:619)
    If i use cs.registerOutParameter(4, Types.ARRAY, "SCHEMA_OWNER_NAME.ISSUESECTION_LIST"); Then i wont be getting the error.
    COULD ANYONE LET ME KNOW THE WORK AROUND OTHER THAN THE ABOVE SOLUTION LIKE ADDING THE OWNER SCHEMA NAME WITH THE USER DEFINED COLLECTION TYPE.

    There couold be two reasons:
    1) it depends how u have defined type. if ISSUESECTION_LIST is defined in type SCHEMA_OWNER, then you have to call this ways only 'SCHEMA_OWNER_NAME.ISSUESECTION_LIST'
    2) You might have defined using schema_owner_name like scott.<TYPE_NAME>. if its so, then drop it and again define type without using schema owner.
    For detail help post your type declaration.

  • Java.sql.SQLException: Network error IOException: Connection refused:

    hi...i am tryin to connect to sqlserver2000 ....i wanted a dsnless connection...i have downloaded jtds driver...set the classpath..no joy..i'm connecting to sqlserver's default port 1433..i also confirmed that sqlserver tcp is enabled...still gettin the same err:
    java.sql.SQLException: Network error IOException: Connection refused: connect
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java
    :385)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java
    :50)
    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at SQLServerConnect.getConnection(SQLServerConnect.java:27)
    at SQLServerConnect.displayDbProperties(SQLServerConnect.java:44)
    at SQLServerConnect.main(SQLServerConnect.java:80)
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
    at java.net.Socket.connect(Socket.java:507)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSoc
    ket.java:304)
    at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:255)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java
    :310)
    ... 7 more
    Error Trace in getConnection() : Network error IOException: Connection refused:
    connect
    Error: No active Connection
    i even tried connecting to the port 1433 thru telnet...err:Could not open connection to the host, on port 1433:connection failed...
    i thought it cud b a firewall issue...disabled my windows firewall..no joy..
    can ne body help me with this....need to solve this desparately
    thanks in advance
    jude

    Old, but still coming up in google searches. Here's the solution that worked for me:
    Dynamic Port Allocation explained:
    http://support.microsoft.com/kb/823938
    How to: Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)
    http://support.microsoft.com/kb/823938
    In case that dissappears:
    To assign a TCP/IP port number to the SQL Server Database Engine
    1. In SQL Server Configuration Manager, in the console pane, expand SQL Server 2005 Network Configuration, expand Protocols for <instance name>, and then double-click TCP/IP.
    2. In the TCP/IP Properties dialog box, on the IP Addresses tab, several IP addresses appear, in the format IP1, IP2, up to IPAll. One of these are for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. Right-click each address, and then click Properties to identify the IP address that you wish to configure.
    3. If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports, delete the 0.
    4. In the IPn Properties area box, in the TCP Port box, type the port number you wish this IP address to listen on, and then click OK.
    5. In the console pane, click SQL Server 2005 Services.
    6. In the details pane, right-click SQL Server (<instance name>) and then click restart, to stop and restart SQL Server.

  • PL/SQL NUMERIC VALUE ERROR

    Hi ,
    We have following code and sending the data through attachnmet its giving the pl/sql numeric value error.
    Please correct me.
    __Code Details:::__
    CREATE OR REPLACE PROCEDURE APPS.print_reports
    IS
    wfile_handle UTL_FILE.file_type;
    lv_file VARCHAR2 (100);
    lv_date VARCHAR2 (20);
    mail_conn UTL_SMTP.connection;
    lv_rep_headers VARCHAR2 (32000);
    p_o_srv_result xxcss_prf_report_pkg.ref_cur_srv_prog;
    lv_str_type XXCSS_PRF_STRING;
    lv_line VARCHAR2 (32767);
    lv_send_to VARCHAR2 (200);
    lv_host_name VARCHAR2 (200) := 'outbound.cisco.com';
    l_vtab CHAR := CHR (9);
    lv_from VARCHAR2 (200) := '[email protected]';
    lv_att_file_name VARCHAR2 (200);
    lv_path VARCHAR2 (200);
    p_request_type VARCHAR2 (1) := 'E';
    p_request_id NUMBER;
    errbuf VARCHAR2 (2000);
    retcode NUMBER;
    crlf VARCHAR2 (2) := CHR (13) || CHR (10);
    lv_line_data Clob;
    lv_clob clob;
    BEGIN
    BEGIN
    SELECT VALUE
    INTO lv_path
    FROM v$parameter
    WHERE NAME = 'utl_file_dir';
    EXCEPTION
    WHEN OTHERS
    THEN
    lv_path := '\tmp';
    END;
    lv_rep_headers :=
    'REGION'
    || CHR (9)
    || 'COUNTRY'
    || CHR (9)
    || 'CUSTOMER NAME'
    || CHR (9)
    || 'ERP CUSTOMER NUMBER'
    || CHR (9)
    || 'PROFILE ID'
    || CHR (9);
    FOR i IN ( SELECT DISTINCT srv_program_id srv_prgm
    FROM xxcss_prf_cust_srv_programs
    ORDER BY srv_program_id ASC)
    LOOP
    lv_rep_headers := lv_rep_headers ||i.srv_prgm || CHR (9);
    END LOOP;
    lv_rep_headers := lv_rep_headers || CHR (13);
    BEGIN
    XXCSS_PRF_REPORT_PKG.offline_daemon (p_request_id,
    p_request_type,
    p_o_srv_result,
    errbuf,
    retcode);
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.PUT_LINE ('Error in Offline');
    END;
    lv_att_file_name := 'Eligibility_reports'||p_request_id||'.xls';
    -- DBMS_OUTPUT.PUT_LINE (lv_rep_headers);
    wfile_handle := UTL_FILE.fopen (lv_path, lv_att_file_name, 'W');
    UTL_FILE.put_line (wfile_handle, lv_rep_headers);
    BEGIN
    LOOP
    FETCH p_o_srv_result INTO lv_str_type;
    EXIT WHEN p_o_srv_result%NOTFOUND;
    lv_line := NULL;
    FOR i IN 1 .. lv_str_type.COUNT
    LOOP
    lv_line := lv_line || lv_str_type (i) || CHR (9);
    END LOOP;
    lv_line := lv_line || CHR (13);
    UTL_FILE.put_line (wfile_handle, lv_line);
    END LOOP;
    lv_str_type.DELETE;
    END;
    UTL_FILE.fclose (wfile_handle);
    BEGIN
    wfile_handle := UTL_FILE.FOPEN (lv_path, lv_att_file_name, 'R');
    -- DBMS_OUTPUT.PUT_LINE ('inside file');
    LOOP
    UTL_FILE.GET_LINE (wfile_handle, lv_line_data,32767);
    -- DBMS_OUTPUT.PUT_LINE (lv_line_data);
    lv_clob := lv_clob || lv_line_data;
    END LOOP;
    UTL_FILE.FCLOSE (wfile_handle);
    EXCEPTION
    WHEN OTHERS
    THEN
    errbuf := sqlerrm;
    UTL_FILE.FCLOSE (wfile_handle); -- close file
    DBMS_OUTPUT.PUT_LINE ('Exception'||errbuf);
    NULL;
    END;
    DBMS_OUTPUT.PUT_LINE ('afterdata');
    --DBMS_OUTPUT.PUT_LINE (lv_line_data);
    SELECT email_id
    INTO lv_send_to
    FROM xxcss_prf_offline_report_tb
    WHERE request_id = p_request_id AND report_type = p_request_type;
    mail_conn := UTL_SMTP.open_connection (lv_host_name, 25);
    UTL_SMTP.Helo (mail_conn, lv_host_name);
    UTL_SMTP.Mail (mail_conn, 'sangrdas');
    UTL_SMTP.Rcpt (mail_conn, lv_send_to);
    UTL_SMTP.OPEN_Data(mail_conn) ;
    DBMS_OUTPUT.PUT_LINE ('Sending Data');
    UTL_SMTP.write_Data (
    Mail_Conn,
    'Date: '
    || TO_CHAR (SYSDATE, 'Dy, DD Mon YYYY hh24:mi:ss')
    || crlf
    || 'From: '
    || lv_from
    || crlf
    || 'Subject: ELIGIILITY Report_'
    || p_request_id
    || crlf
    || 'To: '
    || lv_send_to
    || crlf
    || 'MIME-Version: 1.0'
    || crlf
    || -- Use MIME mail standard
    'Content-Type: multipart/mixed;'
    || crlf
    || ' boundary="-----SECBOUND"'
    || crlf
    || '-------SECBOUND'
    || crlf
    || 'Content-Type: text/plain;'
    || crlf
    || 'Content-Transfer_Encoding: 7bit'
    || crlf
    || 'some message text'
    || crlf
    || -- Message body
    'more message text'
    || crlf
    || '-------SECBOUND'
    || crlf
    || 'Content-Type: text/plain;'
    || crlf
    || ' name="'|| lv_att_file_name||'"'
    || crlf
    || 'Content-Transfer_Encoding: 8bit'
    || crlf
    || 'Content-Disposition: attachment;'
    || crlf
    || ' filename="'
    || lv_att_file_name
    || '"'
    ||crlf
    ||crlf
    ||lv_clob
    || crlf
    ||crlf
    ||crlf
    || '-------SECBOUND');
    UTL_SMTP.CLOSE_Data(mail_conn) ;
    UTL_SMTP.quit (mail_conn);
    DBMS_OUTPUT.PUT_LINE ('After Mail');
    EXCEPTION
    WHEN OTHERS THEN
    errbuf := sqlerrm;
    DBMS_OUTPUT.PUT_LINE ('ERROR Sending Data'||errbuf);
    ROLLBACK;
    END;
    /

    Yet again, opening a new thread for an existing issue...
    Need help in UTL file
    Same old, same old...
    need a report code
    need to create the header dynamically for a report
    Would have thought you'd get the idea of posting on the forums by now.

Maybe you are looking for

  • TREX - Search Failure - HTTP Server error: 503 - Queue Server down

    Hello, I've got a problem with TREX, the following tasks results in erros: Default Search Search Failure Error during search occurred - com.sapportals.wcm.WcmException: HTTP server error: 503 (Errorcode 7266) An unexpected severe error occurred durin

  • View a function in PL/SQL developer

    I'm a sql developer, quite new to oracle. I'm using PL/SQL developer tool. Now I would like to view how a function is defined. But don't know how to open it. I can see the function, when right click it I have the option of the following: Refresh, cop

  • Integration Crystal 2008 in C++ builder ?

    Hi, I use c++ builder developpement tool. How can i integrate or connect to crystal report 2008 viewer. I search since several weeks but i found nothing. Best regards.

  • Re: Satellite A210-10A, crashes when changing boot order

    Hello, I have a serious problem with my Toshiba laptop, Windows Vista 32bit, 1.8Ghz, 2Gb RAM, AMD Turion 64 x2 There is one hard disk partitioned as two 75Gb drives (C and E). The problem is that, whenever I enter the Boot menu (to boot from CD), or

  • How to create db connection in IBM WebSphere IDE

    Hi, I am using IBM WebSpher 5.1.1. And i want to create a back end using ms-access. Can any one suggest me how to create the connection. While i used Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); i am getting class not found. So i assumed that IBM d