Comples SQL

Hi All ,
I have below part in WHERE clause of my query :
CCD.PERSONAL_ID(+) = per.PERSONAL_ID AND (CCD.personal_id,CCD.card_seq) in (select personal_id, max(card_seq) from
CREDIT_CARD_DATA group by personal_id)
I have added outer join (+) in first part of the above query and need to add this in second part also, can any body tell me how we can do this.
I just want to fetch all the records even second table does or does not have. It may be possible second table does have more than one record or may not have any records.
I hope I am clear in above statement.
Thanks in advance.
Jay Jain

Just guessing, but perhaps this is a case for ANSI syntax to overcome the limitations of oracles outer join syntax...
SQL> WITH per as (select 1 as personal_id from dual union all
  2               select 2 as personal_id from dual union all
  3               select 3 as personal_id from dual)
  4      ,ccd as (select 1 as personal_id, 123 as card_seq from dual union all
  5               select 1, 125 from dual union all
  6               select 2, 234 from dual)
  7  -- END OF TEST DATA
  8  select per.personal_id, ccd.personal_id, ccd.card_seq
  9  FROM per LEFT OUTER JOIN (select personal_id, max(card_seq) as card_seq from ccd group by personal_id) x ON (x.personal_id = per.personal_id)
10           LEFT OUTER JOIN ccd ON (ccd.personal_id = x.personal_id AND ccd.card_seq = x.card_seq)
11  /
PERSONAL_ID PERSONAL_ID   CARD_SEQ
          1           1        125
          2           2        234
          3Or something like...
SQL> WITH per as (select 1 as personal_id from dual union all
  2               select 2 as personal_id from dual union all
  3               select 3 as personal_id from dual)
  4      ,ccd as (select 1 as personal_id, 123 as card_seq from dual union all
  5               select 1, 125 from dual union all
  6               select 2, 234 from dual)
  7  -- END OF TEST DATA
  8  select per.personal_id, ccd.personal_id, ccd.card_seq
  9  FROM per LEFT OUTER JOIN ccd ON ((ccd.personal_id,ccd.card_seq) IN (select personal_id, max(card_seq) as card_seq from ccd group by personal_id) AND ccd.personal_id = per.personal_id)
10  /
PERSONAL_ID PERSONAL_ID   CARD_SEQ
          1           1        125
          2           2        234
          3
SQL>Message was edited by:
BluShadow
to correct code tags

Similar Messages

  • Comples SQL performance issues in 11g

    We are facing Performance Issues for a Complex SQL in Version 11.2. But earlier in 11.1 this SQL is performing well..
    We dont have previous versions SQL Plan for this SQL Statement.
    We Dont want to rewrite the SQL as this SQL has performed Well in previous versions.
    Do we need to change the optimizer parameters so that the Query will be tuned automatically.
    Please help me out

    If you're licensed for the SQL Tuning Pack, you could run the query through the SQL Tuning Advisor see if it can improve.
    It will probably recommend a SQL profile which you can accept.
    You could also hint the SQL directly - you might just want to look at /*+ OPT_PARAM('OPTIMIZER_FEATURES_ENABLE','11.1.0.x') */ 'x' depending on your exact 11.1 version.
    You could alter the session, set optimizer_features_enable and capture a SQL profile manually for the 11.1 plan.
    You could do some root cause analysis as suggested by Karthick.
    See threads:
    How to post a SQL tuning request: HOW TO: Post a SQL statement tuning request - template posting
    When your query takes too long: When your query takes too long ...
    For some recent relevant examples about identifying plans changes following upgrade, see also Coskan Gundogar's blog:
    http://coskan.wordpress.com/2011/02/14/plan-stability-through-upgrade-why-is-my-plan-changed-bugfixes-1/
    http://coskan.wordpress.com/2011/02/15/plan-stability-through-upgrade-why-is-my-plan-changed-bugfixes-2/
    http://coskan.wordpress.com/2011/02/17/plan-stability-through-upgrade-why-is-my-plan-changed-new-optimizer-parameters/

  • Need help in compling sql file

    Hi,
    I am having around 20 sql files (20 different proc/functions) and I am changing almost all the sql files frequently, for compiling everytime I am executing
    SQL> @1.sql
    SQL> @2.sql
    SQL> @20.sql
    Its there anyway to compile all the sql's in one shot.
    Thanks

    Step 1: save all source code in c:\
    step 2 : Create file main.sql in c:\
    /*main.sql file*/
    Spool C:\temp\sql\pkg_installation_errors.log
    prompt #compliing package 1;
    @@C:\1.sql;
    show errors;
    prompt #compliing package 2;
    @@C:\2.sql;
    show errors;
    prompt #compliing Porcedure3;
    @@C:\3.sql;
    show errors;
    prompt #compliing Function 4;
    @@C:\4.sql;
    show errors;
    prompt #compliing package 5;
    @@C:\5.sql;
    show errors;
    prompt #compliing package 6;
    @@C:\6.sql;
    show errors;
    spool off;
    step 3: \ run it from sqlplus
    It wil work

  • Complex SQL

    Hi All ,
    I have below part in WHERE clause of my query :
    CCD.PERSONAL_ID(+) = per.PERSONAL_ID AND (CCD.personal_id,CCD.card_seq) in (select personal_id, max(card_seq) from CREDIT_CARD_DATA group by personal_id)
    I have added outer join (+) in first part of the above query and need to add this in second part, can any body tell me how we can do this.
    I just want to0 fetch all the records even second table does or does not have. It may be possible second table does have more than one record or may not have any records.
    I hope I am clear in above statement.
    Thanks in advance
    Jay Jain

    ************ DUPLICATE POST *************
    Answer on this one: Comples SQL
    ************ DUPLICATE POST *************

  • Node in my mindi with SELECT MINUS

    Hi
    I have a table SYSADM.EQPTO_CRM_PI_AGRUP_SEM_RH_LTR with 36977
    SQL>  SELECT COUNT (1) FROM SYSADM.EQPTO_CRM_PI_AGRUP_SEM_RH_LTR;
      COUNT(1)
         36977When I do SELECT MINUS other query
    SQL> SELECT count(1) FROM (
      2   SELECT distinct CNPJ FROM SYSADM.EQPTO_CRM_PI_AGRUP_SEM_RH_LTR
      3    minus
      4    SELECT  distinct CAST(cp.duns_number AS VARCHAR2(14))
      5          FROM      sysadm.ps_loc_cntrct_sn contr,
      6                   sysadm.ps_rd_company cp
      7            WHERE cp.duns_number <> '00000000000000'
      8               AND cp.companyid = contr.companyid
      9               AND cp.setid = contr.setid
    10      AND  CONTR.EFFDT <= SYSDATE)
    11  /
      COUNT(1)
            51Return me 51 records
    When I run the complement
    SQL> SQL> SELECT count(1) FROM (
      2    2   SELECT distinct CNPJ FROM SYSADM.EQPTO_CRM_PI_AGRUP_SEM_RH_LTR
      3    3    intersect
      4    4    SELECT  distinct CAST(cp.duns_number AS VARCHAR2(14))
      5    5          FROM      sysadm.ps_loc_cntrct_sn contr,
      6    6                   sysadm.ps_rd_company cp
      7    7            WHERE cp.duns_number <> '00000000000000'
      8    8               AND cp.companyid = contr.companyid
      9    9               AND cp.setid = contr.setid
    10   10                                 AND  CONTR.EFFDT <= SYSDATE)
    11   11  /
    SQL>   COUNT(1)
      2  ----------
      3       3684236842 + 51 <> 36977
    What is wrong ?
    With INTERSECT
      Thank you in advance
    Message was edited by:
            muttleychess                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I have a tableSYSADM.EQPTO_CRM_PI_AGRUP_SEM_RH_LTR
    with 36977
    SQL> SELECT count(1) FROM (
    2 SELECT distinct CNPJ FROM
    SYSADM.EQPTO_CRM_PI_AGRUP_SEM_RH_LTR
    3 minus
    4 SELECT distinct CAST(cp.duns_number AS
    VARCHAR2(14))
    5      FROM sysadm.ps_loc_cntrct_sn contr,
    6 sysadm.ps_rd_company cp
    7 WHERE cp.duns_number <>
    '00000000000000'
    8 AND cp.companyid =contr.companyid
    9 AND cp.setid = contr.setid
    0     AND CONTR.EFFDT <= SYSDATE)
    11 /
    COUNT(1)
    51
    When I run the complement
    code]
    SELECT count(1) FROM
    SYSADM.EQPTO_CRM_PI_AGRUP_SEM_RH_LTR
    2 MINUS
    3 SELECT count(1) FROM (
    4 SELECT distinct CNPJ FROM
    SYSADM.EQPTO_CRM_PI_AGRUP_SEM_RH_LTR
    5 minus
    6 SELECT distinct CAST(cp.duns_number AS
    VARCHAR2(14))
    7      FROM sysadm.ps_loc_cntrct_sn contr,
    8 sysadm.ps_rd_company cp
    9 WHERE cp.duns_number <>
    '00000000000000'
    10 AND cp.companyid =contr.companyid
    11 AND cp.setid = contr.setid
    12 AND CONTR.EFFDT <= SYSDATE)
    13 /
    COUNT(1)
    36977
    COMPLEMENT ?!?!?!?
    let's break down that query. I'll rewrite it using
    simple words:
    select count(1) from REAL_TABLE
    minus
    select count(1) from (
    a query that returns 51 rows
    or:
    select 36977 from dual
    minus
    select 51 from dual;
    what does that do? it doesn't do SUBTRACTION, which
    is what you seem to want. it does a MINUS operation
    on a SET. VEHN DIAGRAMS!!!!I used only COUNT for to show, but was columns I know vehn Diagrams, but I did not where is wrong

  • See this error in report REP-1401: cf_1formula: Fatal PL/SQL errir occurred

    hi mater
    sir i use oracel reprot 6i
    i try to use formula for calculation see
    function avggFormula return Number is begin
    :cp_1 := (:bugamt-nvl(:totexp,0)/:bugamt)*100 ;
    return(:cp_1);
    end;
    this formula complie rightly no error
    but when i run my report
    that give me this error
    REP-1401: 'cf_1formula': Fatal PL/SQL errir occurred.
    ORA-01476: divisor is equal to zero
    please give me idea how i solve my this error
    thank;
    aamir

    Hi Aamir,
    The problem is that divisor by 0 (zero) is not possible.
    So you need to make sure that in your calculation there's no division by zero.
    In your case :bugamt is equal to zero then you will get this error.
    So just make sure that :bugamt is not equal to zero.
    You can do this as follows:
    function avggFormula return Number is begin
    IF :bugamt != 0 THEN
    :cp_1 := (:bugamt-nvl(:totexp,0)/:bugamt)*100 ;
    END IF;
    return(:cp_1);
    end;
    Regards
    Arif

  • XML Schema Collection (SQL Server 2012): Complex Schema Collection with Attribute - Should xs or xsd be used in the coding?

    Hi all,
    I just got a copy of the book "Pro SQL Server 2008 XML" written by Michael Coles (published by Apress) and try to learn the XML Schema Collection in my SQL Server 2012 Management Studio (SSMS2012). I studied Chapter 4 XML Collection of the book
    and executed the following code of Listing 4-8 Complex Schema with Attribute:
    -- Pro SQL Server 2008 XML by Michael Coles (Apress)
    -- Listing04-08.sql Complex XML Schema with Attribute
    -- shcColes04-08.sql saved in C:\\Documents\XML_SQL_Server2008_code_Coles_Apress
    -- 6 April 2015 8:00 PM
    CREATE XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute
    AS
    N'<?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="item">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" />
    <xs:element name="color" />
    <xs:group ref="id-price" />
    <xs:group ref="size-group" />
    </xs:sequence>
    <xs:attribute name="id" />
    <xs:attribute name="number" />
    </xs:complexType>
    </xs:element>
    <xs:group name="id-price">
    <xs:choice>
    <xs:element name="list-price" />
    <xs:element name="standard-cost" />
    </xs:choice>
    </xs:group>
    <xs:group name="size-group">
    <xs:sequence>
    <xs:element name="size" />
    <xs:element name="unit-of-measure" />
    </xs:sequence>
    </xs:group>
    </xs:schema>';
    GO
    DECLARE @x XML (dbo.ComplexTestSchemaCollection_attribute);
    SET @x = N'<?xml version="1.0"?>
    <item id="749" number="BK-R93R-62">
    <name>Road-150 Red, 62</name>
    <color>Red</color>
    <list-price>3578.27</list-price>
    <size>62</size>
    <unit-of-measure>CM</unit-of-measure>
    </item>';
    SELECT @x;
    GO
    DROP XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute;
    It worked nicely. But, I just found out the coding that was downloaded from the website of Apress and I just executed was different from the coding of Listing 4-8 listed in the book: all the <xs: ....> and </xs: ..> in my SSMS2012 are
    listed as <xsd:...> and </xsd:...> respectively in the book!!??  The same thing happens in the Listing 4-3 Simple XML Schema, Listing 4-5 XML Schema and Valid XML Document with Comple Type Definition, Listion 4-6 XML Schema and XML
    Document Document with Complex Type Using <sequence> and <choice>, and Listing 4-7 Complex XML Schema and XML Document with Model Group Definition (I executed last week) too.  I wonder: should xs or xsd be used in the XML
    Schema Collection of SSMS2012?  Please kindly help,  clarify this matter and explain the diffirence of using xs and xsd for me.
    Thanks in advance,
    Scott Chang   

    Hi Scott,
    Using xs or xsd depends on how you declare the namespace prefix.
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="item">
    I've posted a very good link in your last question, just in case you might have missed it, please see the below link.
    Understanding XML Namespaces
    In an XML document we use a namespace prefix to qualify the local names of both elements and attributes . A prefix is really just an abbreviation for the namespace identifier (URI), which is typically quite long. The prefix is first mapped to a namespace
    identifier through a namespace declaration. The syntax for a namespace declaration is:
    xmlns:<prefix>='<namespace identifier>'
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Comparison of Data Loading techniques - Sql Loader & External Tables

    Below are 2 techniques using which the data can be loaded from Flat files to oracle tables.
    1)     SQL Loader:
    a.     Place the flat file( .txt or .csv) on the desired Location.
    b.     Create a control file
    Load Data
    Infile "Mytextfile.txt" (-- file containing table data , specify paths correctly, it could be .csv as well)
    Append or Truncate (-- based on requirement) into oracle tablename
    Separated by "," (or the delimiter we use in input file) optionally enclosed by
    (Field1, field2, field3 etc)
    c.     Now run sqlldr utility of oracle on sql command prompt as
    sqlldr username/password .CTL filename
    d.     The data can be verified by selecting the data from the table.
    Select * from oracle_table;
    2)     External Table:
    a.     Place the flat file (.txt or .csv) on the desired location.
    abc.csv
    1,one,first
    2,two,second
    3,three,third
    4,four,fourth
    b.     Create a directory
    create or replace directory ext_dir as '/home/rene/ext_dir'; -- path where the source file is kept
    c.     After granting appropriate permissions to the user, we can create external table like below.
    create table ext_table_csv (
    i Number,
    n Varchar2(20),
    m Varchar2(20)
    organization external (
    type oracle_loader
    default directory ext_dir
    access parameters (
    records delimited by newline
    fields terminated by ','
    missing field values are null
    location ('file.csv')
    reject limit unlimited;
    d.     Verify data by selecting it from the external table now
    select * from ext_table_csv;
    External tables feature is a complement to existing SQL*Loader functionality.
    It allows you to –
    •     Access data in external sources as if it were in a table in the database.
    •     Merge a flat file with an existing table in one statement.
    •     Sort a flat file on the way into a table you want compressed nicely
    •     Do a parallel direct path load -- without splitting up the input file, writing
    Shortcomings:
    •     External tables are read-only.
    •     No data manipulation language (DML) operations or index creation is allowed on an external table.
    Using Sql Loader You can –
    •     Load the data from a stored procedure or trigger (insert is not sqlldr)
    •     Do multi-table inserts
    •     Flow the data through a pipelined plsql function for cleansing/transformation
    Comparison for data loading
    To make the loading operation faster, the degree of parallelism can be set to any number, e.g 4
    So, when you created the external table, the database will divide the file to be read by four processes running in parallel. This parallelism happens automatically, with no additional effort on your part, and is really quite convenient. To parallelize this load using SQL*Loader, you would have had to manually divide your input file into multiple smaller files.
    Conclusion:
    SQL*Loader may be the better choice in data loading situations that require additional indexing of the staging table. However, we can always copy the data from external tables to Oracle Tables using DB links.

    Please let me know your views on this.

  • Problem with Pro*C/C++ complie in linux

    I install Oracle8.1.7 in my Mandrake 7.2 ( like redhat7.1) , and it works well except with proc not works well.
    when I complie the precomp demo program, it gives much errors. I note the proc config file length was zero.
    The following is errors I get when do:
    cd precomp/demo/proc
    make -f demo_proc.mk sample1
    it print very large errors, like follow:
    Pro*C/C++: Release 8.1.7.0.0 - Production on PGFZNe 7TB 6 11:46:04 2001
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    System default option values taken from: /home/u01/precomp/admin/pcscfg.cfg
    Error at line 33, column 11 in file /usr/include/stdio.h
    # include <stddef.h>
    ..........1
    PCC-S-02015, unable to open include file
    Error at line 38, column 11 in file /usr/include/stdio.h
    # include <stdarg.h>
    ..........1
    PCC-S-02015, unable to open include file
    Error at line 29, column 10 in file /usr/include/bits/types.h
    #include <stddef.h>
    .........1
    PCC-S-02015, unable to open include file
    Error at line 14, column 10 in file /usr/include/_G_config.h
    when I run proc without file, it print options as following:
    Pro*C/C++: Release 8.1.7.0.0 - Production on Mon Jul 9 11:19:38 2001
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    System default option values taken from: /home/u01/precomp/admin/pcscfg.cfg
    Option Name Current Value Description
    auto_connect no Allow automatic connection to ops$ account
    char_map charz Mapping of character arrays and strings
    close_on_commitno Close all cursors on COMMIT
    code kr_c The type of code to be generated
    comp_charset multi_byte The character set type the C compiler supports
    config default Override system configuration file with another
    cpp_suffix none Override the default C++ filename suffix
    dbms native v6/v7/v8 compatibility mode
    def_sqlcode no Generate '#define SQLCODE sqlca.sqlcode' macro
    define none Define a preprocessor symbol
    duration transaction Set pin duration for objects in the cache
    dynamic oracle Specify Oracle or ANSI Dynamic SQL Semantics
    errors yes Whether error messages are sent to the terminal
    errtype none Name of the list file for intype file errors
    fips none FIPS flagging of ANSI noncompliant usage
    header none Specify file extension for Precompiled Headers
    hold_cursor no Control holding of cursors in the cursor cache
    iname none The name of the input file
    include none Directory paths for included files
    intype none The name of the input file for type information
    lines no Add #line directives to the generated code
    lname none Override default list file name
    ltype none The amount of data generated in the list file
    maxliteral 1024 Maximum length of a generated string literal
    maxopencursors 10 Maximum number of cached open cursors
    mode oracle Code conformance to Oracle or ANSI rules
    nls_char none Specify National Language character variables
    nls_local no Control how NLS character semantics are done
    objects yes Support object types
    oname none The name of the output file
    oraca no Control the use of the ORACA
    pagelen 80 The page length of the list file
    parse full Control which non-SQL code is parsed
    prefetch 1 Number of rows pre-fetched at cursor OPEN time
    release_cursor no Control release of cursors from cursor cache
    select_error yes Control flagging of select errors
    sqlcheck syntax Amount of compile-time SQL checking
    sys_include none Directory where system header files are found
    threads no Indicates a multi-threaded application
    type_code oracle Use Oracle or ANSI type codes for Dynamic SQL
    unsafe_null no Allow a NULL fetch without indicator variable
    userid none A username/password [@dbname] connect string
    varchar no Allow the use of implicit varchar structures
    version recent Which version of an object is to be returned
    PCC-F-02135, CMD-LINE: User asked for help
    How can I do to solve this problem now?
    Note: I need pro*c/c++ to works well in my project.
    Thank you very much for your kindly help!
    chen chuanwen: [email protected]
    null

    Sorry! I have not explain it clearly.
    To solve it , you do following :
    1. locate stdarg.h ( or find /usr -name stdarg.h ), assume you find a stdarg.h in /usr/lib/gcc-lib/XXX/XXX/include/stdarg.h
    2.ln -s /usr/lib/gcc-lib/XXX/XXX/include/stdarg.h /usr/include/stdarg.h or cp /usr/lib/gcc-lib/XXX/XXX/include/stdarg.h /usr/include
    ( above 2 step was to make Pro*C can find stdarg.h in /usr/include )
    3. for file stddef.h do like step 1,2
    4. append a line in your Pro*C config file:
    CODE=ANSI_C
    null

  • Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed

    Hi,
    I am facing a problem while adding a new parameter n my JSP Report JDBC query based on a ref-cursor from a stored procedure define in a package in database.
    No problem at database level, I have added the new parameter in package specification and Package body for that procedure and compile my package, it complies without any error and warning.
    but when I open the report and add parameter in the report JDBC query window, then it is generating a error message,
    "Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed "
    and I am unable to add the new parameter in report.
    e.g.
    Actual which was working is:
    My-package.My-procedure(:P1,:P2,:P3 ,:P4,:P5,:P6,:P7)
    I want to do this:
    My-package.My-procedure(:P1,:P2,:P3 ,:P4,:P5,:P6,:P7,:P8)
    but unable to do due to this error message:
    ("Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed ")
    Reports Builder 10g:
    Database 10g:
    Operating system windows XP:
    using JDBC Query base on ref-cursor coming from the stored procedure define in the Package.
    Regards,
    Khan

    and compile my package, it complies without any error and warning.That doesn't mean anything in this case. You are getting a runtime error, not a compilation error. The error is coming when you execute your procedure.
    Did you test your modified procedure in sqlplus or SQL Developer?

  • Explain plan not displayed in sql trace file

    Hello,
    I don't understand why in sql trace file, after tkprof transformation, for several queries the explain plan is displayed and for several queries, no explain plan is displayed.
    How can I have the explain plan for all queries?
    Thanks for your help.

    Was this a trace started on an already running task? Was the trace stopped before the task completed? Did the trace file reach its set size limit before the task compled?
    In all three cases above you would have cursors that were not closed and stats information not written to the trace file resulting in incomplete data for some SQL.
    HTH -- Mark D Powell --

  • SQL Server Notification Services Removed from SQL Server 2008

    It comes as no surprise to us that 2008 will not be supporting notification services.  Several years ago our company developed our product line of alerting applications and gave some long and serious thought into using SQL Notification services. 
    Besides the fact that the NS desktop alerting component itself was rather bland/limited, (an acknowledge button, image, hyperlink) at the time it just made no sense to create a core component of the business plan around such a 3rd party dependent widget. 
    While a look at this MS page shows only a few companies who have built alerting systems around NS,
    http://www.microsoft.com/sql/technologies/notification/partners/appsoftware.mspx
    ….there is actually quite a few companies who have done this and must now consider a total rewrite of their alert system.
    Quite frankly, looking forward at MS's new family of Communications servers,
    http://msdn2.microsoft.com/en-us/office/aa905499.aspx
    I am not sure that things are changing much.
    "Welcome to the Microsoft Office Live Communications Server developers' home on MSDN. Live Communications Server 2005 provides your business with an enterprise-ready instant messaging, presence awareness, and an extensible platform that connects people, information, and business processes—enabling better decisions faster."
    Remember this?
    MSN Buys MessageCast for Real-Time Alerts
    http://www.eweek.com/c/a/Messaging-and-Collaboration/MSN-Buys-MessageCast-for-RealTime-Alerts/
    MessageCast was a serious product on the up.  They sold out and poof.  The whole fiasco was a joke.
    As it pertains to alerting platforms, the good call just may be having a architecture that is somewhat autonomous ( i.e.  Ok, perhaps Windows OS, .Net Framework and SQL Server as prerequisites is ok) to MS embedded components and not reliant on “Live Server" licenses.  Seems like just a better bet hands down all day long.
    I can tell you that about 5% of all alerts our clients create are sent to inform end users “Exchange is Down”.  It’s hard to get a OutLook Desktop Alert when Exchange is down.
    So, an alert system designed from scratch in-house (the hard way) may just be the heads up alert your customer needs to see.  If for nothing else, you can control your products destiny….unless of course MS Windows is made obsolete.  <wink>  Unlikely.  Hey....without MS products, we would not be in business.  They make some of the best software in the world.  But that does not mean your campany is not capable of the same.

    I'm coming to the discussion of the fate of Notification Services a bit late as it is now December. It is my view that Microsoft should rethink its position on Notification Services, and should continue to support and evolve it until such time as it might be migrated to the future "alerting" solution Microsoft devises for at least the following 2 reasons:
    (1) Notification Services addresses an enterprise application integration need complementary to Microsoft's web service strategy. This is a place Microsoft has not gone before, but needs to go. Why? EAI vendors won't modify their infrastructure to make them web service oriented ... they can't because it is legacy. Instead, they try to buy something and attach it to legacy ... but that doesn't work too well. Microsoft already has started/built greenfield. Further, Microsoft has commoditized such so that with notification services and its other .NET-based products (at least they evolve to such) a full complement of architectural components is being or has been assembled. Why would Microsoft make such an investment ... across the portfolio of server products ... and then back off of it? Microsoft has not been in the enterprise space before to the degree it has wished. It has intimated, at least, that it will be at the periphery with its variety of services and products. An integration broker is necessary for success at the periphery, and it provides a bridge to the enterprise back office that has the property of loose coupling, which is both good for Microsoft and its clients. 
    (2) Microsoft claims to be working to develop a server platform suitable to provision notification services. This server platform could be productized as Microsoft intends, and then notification services could be made to work on that platform and then it could be open sourced. If Microsoft intends to provide a kind of application server foundation that would make it possible for non-Microsoft development teams to build out services on a Microsoft stack that can be hosted with the same set of services as, say, IIS, Biztalk, SQL Server, etc., then it seems that Notification Services could easily be migrated to this server framework once such is ready for prime time. Functional expansion of such could be accomplished by an open source community if Microsoft chooses to not further extend it on its own dime ... maybe even on its own nickel.
    I've read some of the reasons justifying Microsoft's rationale to discontinue its Notification Services product line. One was that not many people used it. Blogs have listed a number of companies that have used it. The number may not be to the scale Microsoft would like ... one could look at Biztalk and suggest that Workflow Foundation represents Microsoft's belief that Biztalk too should be deprecated. Maybe so. But the strategy Microsoft is taking with workflow does not drop support for a core architectural capability. Why not keep Notification Services and give people time to learn how to architect in enterprise fashion with Microsoft infrastructure? Why not use it to seed an open source community? It probably costs you little ... and you have an open source community option that could get Microsoft further into an enterprise than it has previously been ... right into the middle ... leveraging Microsoft web service innovations in spades at substantially less cost than traditional EAI vendors, IBM, and other competitors could afford. People have to learn how to use Microsoft products in an enterprise context ... aside from specialized applications and OS vmware, what products have you put out that systematize infrastructure?
    I've also heard that Microsoft is considering incorporation of Notification Services as part of Reporting Services. Please pardon me but that seems ack basswards ... events are not reports, but reports could be events if you view reports as correlations over critical business activities instead of some statically produced bit of information to be shoved off into someone's mailbox or file system or even web site. Reports are static. Events are part of a dynamic and learning enterprise platform. Isn't that what you're attempting to build infrastructure for? Isn't that exactly what Microsoft needs to secure its position at the back of an enterprise just as it has the front?
    Please reconsider your position. And please contact me at tommy  at zipa dot deedoodah dot com to discuss. I'm as opinionated as everyone else, and I think you have a good product here that you're throwing away. If you don't want it, I will take it ...
    Sincerely,
    Tom Winans

  • SQL Plus session - "schema.package" has been invalidated on making any chng

    Hi
    I am in the process of testing a stored procedure. Whenever I make changes to the procedure I am executing it from the SQL Plus session. But whenever I make a change to the procedure - i have to close that particular SQL Plus session and open another one. I get the message:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-04061: existing state of has been invalidated
    ORA-04061: existing state of package body
    "schema.package" has been invalidated
    ORA-04065: not executed, altered or dropped package body
    Is there a way that I do not have to open a new SQL Plus session everytime I make change to the package?

    It does not help :(. I get this problem in a SQL+ session only when I make a change in a JDev session. I have to log off the SQL+ session and log back in and it is OK again without re-compling anything. I don't have a problem with two SQL+ session. Isn't that strange?
    ben

  • PL/SQL TABLE declarations must currently use binary_integer indexes

    Hi,
    I am having procedure written in form6i, this procedure is having pl/sql table datatyep "v_suppmesg orcl.err_message.error_tabtype;" this pl/sql datatype is defined in database and the procedure in database is not having any error in it.
    But when i am compling my form its giving me error
    PL/SQL TABLE declarations must currently use binary_integer indexes
    and error point is *"i_rowindex"* in the sentance given below.
    *"SET_GROUP_CHAR_CELL (g_suppress_error_colid, v_rowindex, v_suppmesg(i_rowindex));"*
    PROCEDURE PRC_A IS
    v_rowindex NUMBER (5,0) := 1;
    v_suppmesg orcl.err_message.error_tabtype;
    BEGIN
    g_suppress_error_rgid := FIND_GROUP (g_suppress_error_rgname);
    IF ID_NULL (g_suppress_error_rgid)
    THEN
    g_suppress_error_rgid := CREATE_GROUP (g_suppress_error_rgname, GLOBAL_SCOPE);
    g_suppress_error_colid := ADD_GROUP_COLUMN ( g_suppress_error_rgid
    , g_suppress_error_colname
    , CHAR_COLUMN
    , 15);
    orcl.err_message.get_messages (v_suppmesg);
    FOR i_rowindex IN 1..v_suppmesg.count
    LOOP
    ADD_GROUP_ROW (g_suppress_error_rgid, END_OF_GROUP);
    SET_GROUP_CHAR_CELL (g_suppress_error_colid, v_rowindex, v_suppmesg(i_rowindex));
    v_rowindex := v_rowindex + 1;
    END LOOP;
    ELSE
    g_suppress_error_colid := FIND_COLUMN (g_suppress_error_rgname||'.'||g_suppress_error_colname);
    END IF;
    END Init_Suppress_Message;
    can anyone tell me what's wrong in this.

    I have the folowing compiling and executing fine (Forms 10.1.2):
    DECLARE
      type t1 is table of VARCHAR2(100) index by BINARY_INTEGER ;
      tab t1;
      rg_id RecordGroup;
      gc_id GroupColumn; 
    BEGIN
         tab(1) := 'One' ;
         tab(2) := 'Two' ;
         tab(3) := 'Three' ;
         rg_id := FIND_GROUP ('RG10');
         IF ID_NULL (rg_id)
         THEN
              rg_id := CREATE_GROUP ('RG10', GLOBAL_SCOPE);
              gc_id := ADD_GROUP_COLUMN ( 'RG10'
              , 'COL1'
              , CHAR_COLUMN
              , 15);
              --orcl.err_message.get_messages (v_suppmesg);
              FOR i IN 1..tab.count
              LOOP
              ADD_GROUP_ROW ('RG10', END_OF_GROUP);
              SET_GROUP_CHAR_CELL ('RG10.COL1', i, tab(i));
              END LOOP;
         END IF;
    END;Francois

  • PL/SQL: numeric or value error (character string buffer too small)

    Hi All,
    Below is the procedure used to send notifications. It was working fine in previous DB version :- 10.1.0.5.0 and there was recent upgrade to 11.2.0.2.0.
    I complies fine, but when executing it throws the error.
    PROCEDURE PROC_STATUS_MAIL_UNADJ IS
           K_BOUNDARY CONSTANT VARCHAR2(1000) := 'a1b2c3d4e3f2g1';
          l_analysis_report  VARCHAR2(32767); --empty_clob; --clob :=
          l_header VARCHAR2(1000);
          l_footer VARCHAR2(200);
          cnxn UTL_SMTP.connection;
          cursor cloc is select location_id from locations order by location_id asc;
          loc_id cloc%rowtype;
    BEGIN
      dbms_output.enable (1000000);
         FOR loc_id in  cloc
         loop
         l_analysis_report := '<style type="text/css">
        <!--.style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; color: #FF0000}-->
        <!--.sidebar1 { font-family: Arial, Helvetica, sans-serif; font-size: 10px}-->
        <!--.text { font-family: Arial, Helvetica, sans-serif; font-size: 12px}-->
        </style>
        <center><b><font face="Arial">Run Summary Report'
                    || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH:MI AM') || '<br><br></font></b></center>'
                    || ' <div align="center"><table width="95%" border="1" cellspacing="0" cellpadding="1" </div>'
                    || '<span style="font-size: 10pt; font-family: Arial"> </span> '
                    || '<tr bgcolor=b4b4b4><td align="center"> <font size="3"> <b>'
                    || 'Analysis</b></td><td align="center"><font size="3"> <b>'
                    || 'Start Time</b></td><td align="center"><font size="3"> <b>'
                    || 'End Time</b></td><td align="center"><font size="3"> <b>'
                    || 'Run Duration (mins)</b></td><td align="center"><font size="3"> <b>'
                    || 'Status</b></font></td></tr> ' || UTL_TCP.CRLF;
                    FOR curr_refresh IN (SELECT AN.ANALYSIS_ID,AN.NAME ANALYSIS_NAME,TO_CHAR(ARH.RUN_START_TIME,'DD/MM/YYYY HH:MI:SS') START_TIME,
                                         TO_CHAR(ARH.RUN_END_TIME,'DD/MM/YYYY HH:MI:SS')END_TIME,
                                         ROUND(((ARH.RUN_END_TIME-ARH.RUN_START_TIME)*24*60),2) RUN_TIME_SECS,ARH.JOB_STATUS STATUS
                                         FROM
                                         RUN_HISTORY ARH,ANALYSES AN
                                         WHERE
                                         AN.ANALYSIS_ID=ARH.ANALYSIS_ID
                                         AND AN.CYCLE_IND_ID IN (1,3)
                                         AND ARH.RUN_START_TIME>TO_DATE(SYSDATE-30)
                                         AND ARH.JOB_NAME LIKE 'RHS_QU%'                                  
                                         AND AN.LOCATION_ID = loc_id.location_id
                                         AND ARH.JOB_STATUS='Completed'
                                         ORDER BY ARH.RUN_START_TIME DESC)
                           LOOP
                       l_analysis_report  := l_analysis_report ||'<tr><td align="center">'|| curr_refresh.analysis_name
                          || '</td><td align="center">' || curr_refresh.start_time || '</td><td align="center">'
                          || curr_refresh.end_time || '</td><td align="center">'|| curr_refresh.RUN_TIME_SECS ||
                          '</td><td align="center">'|| curr_refresh.status ||
                          '</td> </tr>' || UTL_TCP.CRLF;
                      exit when length (l_analysis_report) > 32500;
                   END LOOP;
                  l_analysis_report := l_analysis_report || '</table><br><br>';
                   l_footer := UTL_TCP.CRLF ||'<b> Note: This is an auto generated email. Please do not reply to it. Contact the IT team for any further information.</b>'||  UTL_TCP.CRLF;
                   FOR curr_email IN (SELECT GLOBAL_NAME INSTANCE_NAME,
                                      EU.EMAIL_USER_LAST_NAME last_name, EU.EMAIL_USER_FIRST_NAME ACNAME,
                                      EU.EMAIL_USER_EMAIL_ID,loc.LOCATION_NAME LOC_NAME,
                                      '[email protected]' MAIL_FROM
                                      FROM
                                      RHS_EMAIL_USER EU,LOCATIONS LOC,GLOBAL_NAME
                                      WHERE EU.LOCATION_ID=LOC.LOCATION_ID
                                      AND EU.LOCATION_ID=loc_id.location_id
                                  ) LOOP
                cnxn := UTL_SMTP.open_connection('smtprelay.inc.com', 25);
                UTL_SMTP.helo(cnxn, 'smtprelay.inc.com');
                UTL_SMTP.mail(cnxn, '[email protected]');
                UTL_SMTP.rcpt(cnxn, curr_email.EMAIL_USER_EMAIL_ID);
                      l_header := 'MIME-Version: 1.0'||'
    To: ' || curr_email.last_name || ' <' || curr_email.EMAIL_USER_EMAIL_ID || '>
    From: ' || curr_email.mail_from || '
    Subject: Un-Adjusted Analysis Report for ' || curr_email.loc_name || ' Location from' || curr_email.instance_name || ' on ' || to_char(sysdate, 'DD-MON-YYYY') || '
    Reply-To: [email protected]
    Content-Type: text/html;' || UTL_TCP.CRLF || UTL_TCP.CRLF;
                UTL_SMTP.data(cnxn, l_header || l_analysis_report || l_footer);
                UTL_SMTP.quit(cnxn);
                END LOOP;
                END LOOP;
    END PROC_STATUS_MAIL_UNADJ;
    Error :-
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SYS.UTL_SMTP", line 591
    ORA-06512: at "SYS.UTL_SMTP", line 497
    ORA-06512: at "SYS.UTL_SMTP", line 503
    ORA-06512: at "RISK_HISTORY.PKG_RHS_EMAIL_NOTIFY", line 206
    ORA-06512: at "RISK_HISTORY.PKG_RHS_EMAIL_NOTIFY", line 414
    ORA-06512: at line 2Can you please let me know if there is any issue with code or any upgrade issue ?
    Regards,
    Sunny
    Edited by: k_17 on Oct 13, 2011 12:07 PM

    Hi Helios,
    Many thanks for your reply.
    I am able to figure out the issue. In the code we have
    l_analysis_report  := l_analysis_report ||'<tr><td align="center">'|| curr_refresh.analysis_name
                          || '</td><td align="center">' || curr_refresh.start_time || '</td><td align="center">'
                          || curr_refresh.end_time || '</td><td align="center">'|| curr_refresh.RUN_TIME_SECS ||
                          '</td><td align="center">'|| curr_refresh.status ||
                          '</td> </tr>' || UTL_TCP.CRLF;
                      exit when length (l_analysis_report) > 32500;where "l_analysis_report VARCHAR2(32767);"
    The issue is report has more characters, and when executing it throws the error " ORA-06502: PL/SQL: numeric or value error: character string buffer too small ".
    Can you please let me know how to have more characters/data in the report. Will CLOB help if yes, please let me know how to use it.
    Kindly suggest some options.
    Regards,
    Sunny

Maybe you are looking for

  • Try to sync my ipod touch 3rd gen with windows media player 11 win xp

    Trying to sync my ipod touch 3rd gen with windows media 11. Can anyone please help.

  • Help pls

    i recently installed pny 3500 mem on my msi kt4v mobo it worked for 3 boots then it would not boot up so i replased it with old memory (2 x 256mg) that worked fine before,now i can boot up and run fine for three to four min. then my com runs very slo

  • MacMini and Windows P Remote Destop Connection

    Purchased a MacMini today with primary use to be a media center along with y AppleTV. In that it is in a rack with other equipment I would like to be able to access my Windows Desktop to use programs and visa versa. I was told before my purchase this

  • Corruption of iphoto

                   I had some kind of corruption on my finder.  I now cannot open iPhoto and when I try to reinstall OSX Snow Leopard it won't let me because of iPhoto

  • How to import all layers in Photoshop at one go ?

    Hi there, I am trying to import a Photoshop psd file into AE. This file has a lot of layers. When I do File > Import > FIle, it ask me whether I want to import as footage or Layers. When I chose Layers, I am asked which layers I wanna import in. As I