Generate non matching rows without outerjoin

Oracle Database 11g
I have a query
select B.YEAR_NUMBER ,SUM(NVL(TOTAL_COUNT,0))
from ODS_PERMIT_MV a, DATE_DIM b
where a.PERMIT_ISSUE_DATE_KEY = b.DATE_KEY
and B.CALENDAR_DATE<=trunc(sysdate)
group by B.YEAR_NUMBER
which gives me records in this form
YEAR| COUNT
2011     328
2012     684
However I want result set like
YEAR| COUNT
2009 0
2010 0
2011     328
2012     684
I can get this result with an outer join
select B.YEAR_NUMBER ,SUM(NVL(TOTAL_COUNT,0))
from ODS_PERMIT_MV a, DATE_DIM b
where a.PERMIT_ISSUE_DATE_KEY *(+)* = b.DATE_KEY
and B.CALENDAR_DATE<=trunc(sysdate)
group by B.YEAR_NUMBER
but this again is not acceptable.
Another solution was this
select YEAR_NUMBER,SUM(TOTAL_COUNT) from
select B.YEAR_NUMBER as "YEAR_NUMBER" ,SUM(NVL(TOTAL_COUNT,0)) as "TOTAL_COUNT"
from ODS_PERMIT_MV a, DATE_DIM b
where a.PERMIT_ISSUE_DATE_KEY = b.DATE_KEY
and B.CALENDAR_DATE<=trunc(sysdate)
group by B.YEAR_NUMBER
union
select to_number(to_char(add_months(sysdate,(level-1)*-12),'YYYY')),0
from dual
connect by level <=5
group by YEAR_NUMBER
order by YEAR_NUMBER desc
Still complex, but is there any other way to achieve this?
Regards,
Franklin
Edited by: user486459 on Dec 20, 2012 7:59 AM

Hi,
>
<<outer-join-query>>
but this again is not acceptable.
>
Why? Could you please explain this further. I think it's a simple(/the simplest) way to get your result.
I tried a few other ways, but nothing looks as nice as an outer join. Brief and easy to understand.
-- I tried to break this down to only two columns
-- because you provided no scripts; hopefully I didn't
-- miss anything
-- this is probably a materialized view in your situation
Create Table Ods_Permit_Mv (
   Year_Number    Number(4)
   ,total_count   number
truncate table Ods_Permit_Mv;
-- test-data
Insert Into Ods_Permit_Mv Values (2011,200);
Insert Into Ods_Permit_Mv Values (2011,138);
Insert Into Ods_Permit_Mv Values (2012,100);
Insert Into Ods_Permit_Mv Values (2012,200);
Insert Into Ods_Permit_Mv Values (2012,300);
Insert Into Ods_Permit_Mv Values (2012,84);
commit;
Create Table Date_Dim(
   Year_Number    Number(4) Primary Key
Insert Into Date_Dim Values(2009);
Insert Into Date_Dim Values(2010);
Insert Into Date_Dim Values(2011);
Insert Into Date_Dim Values(2012);
Commit;
-- this is your solution for matching rows only
select B.YEAR_NUMBER ,SUM(NVL(TOTAL_COUNT,0))
From Ods_Permit_Mv A, Date_Dim B
Where A.Year_Number = B.Year_Number
And B.Year_Number<=extract(year from Sysdate)
group by B.YEAR_NUMBER;
-- is this version really better than an outer-join??? or more understandable???
Select   B.Year_Number
         ,(Select sum(  Case
                        When Year_Number = B.Year_Number
                        then
                           Sum(Nvl(Total_Count,0))
                        Else
                           0
                        end)
         From Ods_Permit_Mv A
         group by year_number) as total_count
From Date_Dim B
where B.Year_Number <= extract(year from Sysdate);
-- or this??? (union-all-idea taken from Keith Jamieson)
With help as(
   select B.YEAR_NUMBER year_number, SUM(NVL(TOTAL_COUNT,0)) total_count
   From Ods_Permit_Mv b
   group by B.YEAR_NUMBER
   Union All
   Select  Year_Number Year_Number,  0 Total_Count
   From Date_Dim)   --end with-clause
Select Help.Year_Number, Sum(Help.Total_Count) total_count
From Help
Where Year_Number <=Extract(Year From Sysdate)
group by help.year_number;
-- why don't you like the idea of an outer join?
Select Dim.Year_Number, Sum(Nvl(Fact.Total_Count,0)) Total_Count
From  Date_Dim Dim
      Left Outer Join
      Ods_Permit_Mv Fact
         On (Dim.Year_Number = Fact.Year_Number)
group by Dim.Year_Number;At the end of one post you wrote
>
Still complex, but is there any other way to achieve this?
>
Yes there are, obviously. But why ...
Bye
stratmo
PS: For you further postings please take a look at
Formatting options: [url https://wikis.oracle.com/display/Forums/Forums+FAQ]Forums FAQ the formatting options can be found searching for "formatting options" in the current window (they are mentioned further down that page) (reading the whole FAQ is very helpful; probably you my read it afterwards)
and
[url https://forums.oracle.com/forums/ann.jspa?annID=719]Announcement: Forums Etiquette / Reward Points please because this makes helping easier for the very good ones on this forum. Obviously not me :(

Similar Messages

  • Update,Insert,Delete on table T1 as per matching or non-matching rows in T2

    Hi,
    Need a solution for the following:
    I have two tables T1 and T2:
    T1
    NAME LINK
    a a1
    a a2
    b b1
    c c1
    c c3
    d d1
    T2
    NAME LINK
    a a1
    a a3
    b b1
    b b2
    c c1
    c c2
    c c3
    Requirement: data in table T1 should be same as T2 for the matching values in column 'NAME'. So finally data in T1 should be:
    T1
    NAME LINK
    a a1
    a a3 -- (a,a3) added and (a,a2) deleted
    b b1
    b b2 --(b.b2) added
    c c1
    c c2 --(c,c2) added
    c c3
    d d1 --(d,d1) left as it is as value 'd' not found in T2
    Any help writing a procedure would be appreciated.
    Thanks,
    Priyanka

    delete t1
    where name in (select name from t2);
    insert into t1 (name, link)
    select name, link from t2

  • Excel - Modify rows without touching other data (have gone thru LV report generation 4 designs)

    File attached....
    Have gone thru FAQs and examples. (And also 4 parts of 'Creating a Report in Microsoft Excel Using the LabVIEW Report Generation Toolkit'. Unfortunately this document is not clear enough for me.)
    Have task of modifying rows of the same excel sheet, number of times without touching data  already present (numbers and strings)
    I have an excel file. (attached)
    A test will be run N number of times.  (N<=17)
    SubTask 1 --> Each time it runs, string data needs to be placed in 'n'th row. (...there are going to be notes in Row 18 and row 19)
    SubTask 2  --> Each time it runs, a 1D array data also will be placed in the same row (but in different cells)
    SubTask 3 --> The number 'n' of the row (where to place the current iteration's data) needs to be determined on fly (by looking at "n-1"st non blank row)
    The same file needs to be used.
    How can above be achieved ?
    thnks
    Sandeep
    Attachments:
    sample excel file.xls ‏14 KB

    See if this board will help.
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2391

  • Generating a test result without a module

    I have a basic question about generating a test result without calling a module in TestStand.
    For example, I do a pair of read operations from a product and return the results to a pair of numeric local variables. Now I want to do a sequence pass/fail or numeric limit test based on these two values. The results are already available and I can do a function step to test a result, say from a basic math operation. But I can't create a pass/fail result from a function step. I've gotten around the issue by creating a dummy module that has no function other than to allow me use the expression builder to assign a result to one of the step result items, but this sure seems stupid.
    What am I missing?
    Thanks,
    Dave
    Solved!
    Go to Solution.

    Do it in the Pre-expression.
    Use the <none> adapter as suggested and place down a Numeric Limit Test step.  Then in the Pre-Expression put something like this:
    Step.Result.Numeric = Locals.A - Locals.B
    If you look at the Data Source tab you will see the variable which gets evaluated and compared against the limits.
    In fact if you wanted to you could avoid the Pre-Expression and just put your calculation in the Data Source Expression:
    Locals.A - Locals.B
    You can set up the Limits on the Limits tab for that step.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Non Matched PO receipts

    Hello All,
    I need to develop a query for "Non Matched PO receipts" with the fo;;woing columns
    Supplier Code
    Spplier Name
    quantity received (NOT MATCHED)
    unit price
    currency
    exchange rate
    receiving date
    payment term (assigned to PO)
    so i have wrtiten the following query but it is not returing data is my query correct
    select pv.vendor_type_lookup_code Supplier_code,
    pv.vendor_name Supplier_name,
    rsl.quantity_received,
    aida.unit_price,
    aida.Exchange_rate,
    aia.invoice_currency_code,
    att.name Payment_term
    from AP_Invoices_All aia,
    aP_invoice_distributions_all aida,
    PO_vendors pv,
    AP_TERMS_TL att,
    rcv_transactions rt,
    rcv_shipment_lines rsl
    where aia.vendor_id=pv.vendor_id
    and aia.invoice_id=aida.invoice_id
    and aida.po_distribution_id is null
    and aia.terms_id=att.term_id
    and aida.rcv_transaction_id = rt.transaction_id
    and rt.shipment_line_id = rsl.shipment_line_id
    Thanks,
    Kumar

    Hi,
    Whenever you need help on this forum, post:
    (1) The version of Oracle (and any other relevant software) you're using
    (2) A little sample data (just enough to show what the problem is) from all the relevant tables
    (3) The results you want from that data
    (4) Your best attempt so far
    Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
    If you can present your problem using commonly available tables (for example, tables in scott schema, or views in the data dictionary), then you can omit (2).
    Formatted tabular output is okay for (3). Type &#123;code&#125; before and after the tabular text, to preserve spacing.
    You've already done (4), but it would be better if you could use &#123;code&#125; tags around that, too: it's hard to read without any formatting.

  • Sql query to get union of matching rows

    I want to write a sql query that shows union f all the [Type] for each [Key] if [Key] has atleast one [Type] in common and for non matched [Key]s it will return the row as it is.
    For example In the sql table below [Key] '1' and '2' has [Type] 'B' in common and [Key] '1' and '4' has [Type] 'A' in common. In this case [Key] '1', '2' and '4' are related so result will be union of [Type]s in [Key]s '1', '2' and '4' which are 'A', 'B', 'C'
    and 'E' for each [Key]. And [Key] '3' has no [Type] in common so it will return itself.
    Input:
    declare @categories table ([Key] int, [Type] Char(1))
    insert into @categories ([Key], [Type]) values (1, 'A')
    insert into @categories ([Key], [Type]) values (1, 'B')
    insert into @categories ([Key], [Type]) values (2, 'B')
    insert into @categories ([Key], [Type]) values (2, 'C')
    insert into @categories ([Key], [Type]) values (3, 'D')
    insert into @categories ([Key], [Type]) values (4, 'E')
    insert into @categories ([Key], [Type]) values (4, 'A')
    insert into @categories ([Key], [Type]) values (5, 'F')
    insert into @categories ([Key], [Type]) values (5, 'G')
    insert into @categories ([Key], [Type]) values (6, 'G')
    insert into @categories ([Key], [Type]) values (6, 'H')
    Desired output:
    Key Type
    1 A
    1 B
    1 C
    1 E
    2 A
    2 B
    2 C
    3 D
    4 A
    4 B
    4 E
    5 F
    5 G
    5 H
    6 F
    6 G
    6 H

      
    The data element names are wrong. KEY is a reserved word; “Categories" and "type" are called attribute properties in ISO-11179 rules. Matthias Kläy is right; this is a graph problem in disguise, but you can do it with set theory to get  what are called
    equivalence classes. 
    An edge in a graph has two nodes. Some authors allow a single node to count as a edge, but a better way is to put the same node on both ends of the edge. Here is the graph in a table with all the needed constraints. This is why you should post DDL and not be
    so rude.  
    DROP TABLE Graph;
    CREATE TABLE Graph
    (edge INTEGER NOT NULL,
     node_1 CHAR(1) NOT NULL,
     node_2 CHAR(1) NOT NULL,
     CHECK (node_1 <= node_2),
     PRIMARY KEY (node_1, node_2));
    Here is your data in the correct format. 
    INSERT INTO Graph 
    VALUES 
     (1, 'A', 'B'),
     (2, 'B', 'C'),
     (3, 'D', 'D'), -- orphan node
     (4, 'A', 'E'),
     (5, 'F', 'G'),
     (6, 'G', 'H');
    Now Google Warshall's Algorithm. It uses three nested loops and an adjacency array. This is very clean and fast in a procedural language. Not so much in SQL. Let us do this in steps:
    WITH X1 (edge, node1_1, node1_2, node2_1, node2_2 )
    AS
    (SELECT CASE WHEN G1.edge <> G2.edge 
           THEN G1.edge ELSE G2.edge END,
           G1.node_1, G1.node_2, 
           G2.node_1, G2.node_2       
      FROM Graph AS G1, Graph AS G2
     WHERE G1.node_1 IN (G2.node_1, G2.node_2) 
       AND G1.edge <> G2.edge),
    X2 (edge, node_1, node_2)
    AS
    (SELECT edge, 
    CASE WHEN node1_1 IN (node2_1, node2_2) THEN node1_2 ELSE node1_1 END,
    CASE WHEN node2_1 IN (node1_1, node1_2) THEN node2_2 ELSE node2_1 END
    FROM X1)
    SELECT DISTINCT edge,
           CASE WHEN node_1 < node_2 THEN node_1 ELSE node_2 END,
           CASE WHEN node_2 < node_1 THEN node_1 ELSE node_2 END
     FROM X2;
    The X1 subquery gets the paths of length two. The X2 subquery removes the middle node and creates a new sorted edge. Insert these new rows into Graphs, if they are not there. Repeat the process until no more rows are added. 
    DROP TABLE Graph;
    CREATE TABLE Graph
    (edge INTEGER NOT NULL,
     node_1 CHAR(1) NOT NULL,
     node_2 CHAR(1) NOT NULL,
     CHECK (node_1 <= node_2),
     PRIMARY KEY (node_1, node_2));
    INSERT INTO Graph 
    VALUES 
     (1, 'A', 'B'),
     (2, 'B', 'C'),
     (3, 'D', 'D'), -- orphan node
     (4, 'A', 'E'),
     (5, 'F', 'G'),
     (6, 'G', 'H');
    Here is the monster rolled up into a single statement. 
    INSERT INTO Graph
    SELECT DISTINCT edge,
           CASE WHEN node_1 < node_2 THEN node_1 ELSE node_2 END,
           CASE WHEN node_2 < node_1 THEN node_1 ELSE node_2 END
     FROM (SELECT edge, 
    CASE WHEN node1_1 IN (node2_1, node2_2) THEN node1_2 ELSE node1_1 END,
    CASE WHEN node2_1 IN (node1_1, node1_2) THEN node2_2 ELSE node2_1 END
    FROM 
    (SELECT CASE WHEN G1.edge < G2.edge 
           THEN G1.edge ELSE G2.edge END,
           G1.node_1, G1.node_2, 
           G2.node_1, G2.node_2       
      FROM Graph AS G1, Graph AS G2
     WHERE G1.node_1 IN (G2.node_1, G2.node_2) 
       AND G1.edge <> G2.edge) AS X1(edge,node1_1, node1_2, node2_1, node2_2) )
        AS X2(edge, node_1, node_2)
    EXCEPT 
     SELECT * FROM Graph;
     SELECT * FROM Graph ORDER BY edge, node_1, node_2;
    1 A B
    1 A C
    1 B E
    1 C E
    2 B C
    3 D D
    4 A E
    5 F G
    5 F H
    6 G H
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Select count(*) on sql statement returning zero when a matching row exists.

    Our account has an ANSI C application that checks for the existence a row on an Oracle table(s) by using the following SQL:
    int iCount = 0;
    EXEC SQL
    SELECT count(rownum) INTO :iCount
    FROM sys.all_tab_columns
    WHERE table_name IN
    (SELECT table_name FROM
    sys.all_synonyms
    WHERE upper(synonym_name) = upper(:szDestTable))
    AND upper(column_name) = upper(:szColumnName)
    AND owner = 'DBAUSER';
    The bind variables szDestTable and szColumnName are populated with values parsed from columns on another database table. This application is executed through out the day. Occasionally, the application will report a zero in the iCount when there should be a match. I have verified the szDestTable and szColumnName are populated with the correct values which would find a match and they are correct. To make matters even stranger, the application will parse the same input values and find a match (as it should). At some point during the day, and it can be at any time, the application will NOT find a match on the same file, same values. Every subsequent execution of this application will not find a match on the same values. Once the database is brought down and started up in the evening for its normal backups, the application will find a match again on the same values. This problem does not occur every day. I could be a week or a week and a half between incidents.
    I printed the contents of the sqlca.sqqlerrm.sqlerrmc field to a log file. The sqlca.sqlerrm.sqlerrmc field reported an ORA-1405 bind variable was null when the iCount was reporting a zero. When I compiled this application, I set the Proc*C flag to UNSAFE_NULLS=yes since there are other bind variable in the application that can be NULL and that is ok.
    The above SQL is compiled into the C application using the Proc*C compiler. It is compiled using the Oracle 11.2.0.2 libraries. The application is executed against an Oracle 11.2.0.2 database. The database and application are executed on an HP/Unix 11.31 platform.
    This problem did not start occurring until our account went from Oracle 10.2 to Oracle 11.2. Recently, I have changed the SQL to perform a “SELECT COUNT(rownum)” instead of the “SELECT COUNT(*)”. I compiled the application and executed the new application with the SELECT COUNT(rownum) against the same database where the same application with the SELECT COUNT(*) was failing to find a row that actually existed. The application with the SELECT COUNT(rownum) found the matching row as it should have. The new application has been executing in production for about 10 days now without any problems against ten various Oracle 11.2 databases.
    Why would SELECT COUNT(*) and SELECT COUNT(rownum) be any different?

    This forum is about C programming in general, and about using Studio C in particular.
    Your question is about Oracle database programming. You are more likely to find a helpful answer in a forum about database programming. Start here:
    https://forums.oracle.com/forums/category.jspa?categoryID=18

  • Cannot add row without complete selection of batch / serial numbers SBO 8.8

    Hi
    I have written some code to import a goods receipt po document in SAP 8.8
    When the item is a batch number I get the message 'Cannot add row without complete selection of batch / serial numbers'
    This is my code -
                        doc.Lines.SerialNumbers.SetCurrentLine(0)
                        doc.Lines.SerialNumbers.InternalSerialNumber = batchno
                        doc.Lines.SerialNumbers.ExpiryDate = CDate(bbdate2)
                        doc.Lines.SerialNumbers.ReceptionDate = CDate(Now.Date)
    Can anyone see what is wrong please ?
    Many thanks
    Regards Andy

    Hello
    You would like to import items with batches or items with serials?
    This code is importing items with serials.
    Hereby an expample for each cases
    'bacthes
            oDoc.Lines.BatchNumbers.SetCurrentLine(0)
            oDoc.Lines.BatchNumbers.BatchNumber = "1"
            oDoc.Lines.BatchNumbers.Quantity = 1
            oDoc.Lines.BatchNumbers.Add()
            oDoc.Lines.BatchNumbers.SetCurrentLine(1)
            oDoc.Lines.BatchNumbers.BatchNumber = "2"
            oDoc.Lines.BatchNumbers.Quantity = 1
            oDoc.Lines.BatchNumbers.Add()
            ' here you should apply condition: sum of batch qty = oDoc.Lines.Quantity -this completes the selection
            oDoc.Lines.Add()
    'serials
            oDoc.Lines.SerialNumbers.SetCurrentLine(0)
            ' Use the correct line for selection of serial numbers:
            ' I have the settings "None" -> Systemserialnumber will be used
            ' query: SELECT T0.[SriUniqFld] FROM OADM T0
            oDoc.Lines.SerialNumbers.SystemSerialNumber = "1"
            'oDoc.Lines.SerialNumbers.ManufacturerSerialNumber = "1"
            'oDoc.Lines.SerialNumbers.InternalSerialNumber = "1"
            oDoc.Lines.SerialNumbers.Add()
            oDoc.Lines.SerialNumbers.SetCurrentLine(0)
            oDoc.Lines.SerialNumbers.SystemSerialNumber = "2"
            'oDoc.Lines.SerialNumbers.ManufacturerSerialNumber = "2"
            'oDoc.Lines.SerialNumbers.InternalSerialNumber = "2"
            oDoc.Lines.SerialNumbers.Add()
            ' here you should apply condition: count of serialnumer lines = oDoc.Lines.Quantity
    Regards
    János

  • ITunes Match won't upload non-matched songs on my home network

    As it says in the subject, iTunes Match won't upload non-matched songs on my home network. For a while I thought the problem was with iTunes Match itself. And maybe it still is somehow. But I recently discovered the problem only occurs on my own home network. Any time I add a song to iTunes that isn't in the iTunes store, it should upload it. But instead it just loops in failed attempts to upload, always stopping and starting over at step 1. Occasionally I'll get error messages like -9810, but more often it'll just continue to loop for hours on end. I recently took my MBP to a coffee shop and used their wifi and tried it there, and the songs uploaded without any problem at all. I never used to have this issue over the entire year I was using iTunes Match. My only guess as to what might have caused the issue is when we downgraded the speed of our internet. I can't recall for certain whether that was the exact time my issues began, but it's the only possible change I can think of. I've tried rebooting the router, turning iTunes Match and Genius off and on, rebooting the computer, creating a new iTunes Library, all not solving my problem. Any other ideas?

    There's a longer thread discussing this problem over here: https://discussions.apple.com/thread/4160355?start=120&tstart=0
    What I posted there is that if I enable QOS on my router and limit my upload bandwidth (I used a cap of 1024 kilobits/second) then iTunes Match stops looping and will successfully upload songs and complete match.
    There aren't any blocked ports, it's really just iTunes being a pig and oversaturating the internet connection to a point of failure.
    Super frustrating, it's been a bug for months. I wish I had a better solution.

  • JspException: Non-matching extension tags

              I am getting the following exception when I attempt to bring up a JSP. My JSP uses
              Struts taglibs, which I think are causing the problem. But so far I am unable
              to see what I am doing wrong. The exception and the JSP code are show below:
              EXCEPTION
              [exec] weblogic.servlet.jsp.JspException: (line 129): Non-matching extensio
              n tags //[ null; Line: 129]
              [exec] at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:872)
              [exec] at weblogic.servlet.jsp.JspLexer.mCLOSE_EXTENSION_TAG(JspLexer.j
              ava:2740)
              [exec] at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:2007)
              [exec] at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1892)
              [exec] at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1117)
              [exec] at weblogic.servlet.jsp.JspParser.doit(JspParser.java:90)
              [exec] at weblogic.servlet.jsp.JspParser.parse(JspParser.java:212)
              [exec] at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
              [exec] at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.
              java:255)
              [exec] at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:352)
              [exec] at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:210)
              [exec] at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:164)
              [exec] at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletS
              tubImpl.java:517)
              [exec] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
              etStubImpl.java:351)
              [exec] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
              etStubImpl.java:445)
              [exec] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
              etStubImpl.java:306)
              [exec] at weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction
              .run(RequestDispatcherImpl.java:341)
              [exec] at weblogic.security.service.SecurityServiceManager.runAs(Securi
              tyServiceManager.java:744)
              [exec] at weblogic.servlet.internal.RequestDispatcherImpl.forward(Reque
              stDispatcherImpl.java:251)
              [exec] at org.apache.struts.action.RequestProcessor.doForward(RequestPr
              ocessor.java:1033)
              [exec] at org.apache.struts.action.RequestProcessor.processForwardConfi
              g(RequestProcessor.java:436)
              [exec] at org.apache.struts.action.RequestProcessor.processActionForwar
              d(RequestProcessor.java:401)
              [exec] at org.apache.struts.action.RequestProcessor.process(RequestProc
              essor.java:279)
              [exec] at org.apache.struts.action.ActionServlet.process(ActionServlet.
              java:1422)
              [exec] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.j
              ava:523)
              [exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              [exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              [exec] at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAc
              tion.run(ServletStubImpl.java:1058)
              [exec] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
              etStubImpl.java:401)
              [exec] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
              etStubImpl.java:306)
              [exec] at weblogic.servlet.internal.WebAppServletContext$ServletInvocat
              ionAction.run(WebAppServletContext.java:5412)
              [exec] at weblogic.security.service.SecurityServiceManager.runAs(Securi
              tyServiceManager.java:744)
              [exec] at weblogic.servlet.internal.WebAppServletContext.invokeServlet(
              WebAppServletContext.java:3086)
              [exec] at weblogic.servlet.internal.ServletRequestImpl.execute(ServletR
              equestImpl.java:2544)
              [exec] at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              [exec] at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              [exec] >
              JSP CODE: (this is the code I think is causing the problem)
                                                      <logic:present name="TalkBadgeLookupForm" property="badgeNumber">
                                                           <td class="data_cell">
                                                                <html:submit property="submit" onclick="javascript:openCenteredWindow
              ('http://127.0.0.1/TalkProduction.do', 'Name', '100', '200', '', 'Org')">
                                                                     <bean:message key="production"/>
                                                                </html:submit>
                                                           </td>
                                                      </logic:present>
                                                      <logic:notPresent name="TalkBadgeLookupForm" property="badgeNumber">
                                                           <td class="data_cell">
                                                                <html:button property="null" disabled="true">
                                                                     <bean:message key="production"/>
                                                                </html:submit>
                                                           </td>
                                                      </logic:notPresent>
              I'd appreciate any ideas anyone has on this.
              Thanks.
              Aidan
              

    http://google.com/notebook/public/17397097594332743588/BDTyXIgoQwbHW-b8h

  • Generating a Primary Key WITHOUT using a Sequence Number

    Hi Everyone:
    I am trying to generate a primary key without using a sequence number or row count. What the user wants is the maximum value of the highest primary key already in the row set plus 1.
    For example, this is a Oracle Table (eg. named BatchSubmit) used to initiate batch job submission, and the primary key is an integer named "Runcard_Number". If there are 4 rows in this table and the Runcard_Numbers are 2, 6, 8 & 12, then the next generated Runcard_Number would be 13.
    I have looked throughout this forum and see how to generate numbers using a DBSequence, but the user does not want that. The numbers mean something to them, and they don't want them randomly assigned other than the max in the rowset plus 1. To do it in SQL it would be - select max(Runcard_Number) + 1 from BatchSubmit;
    I have been looking at using a hasnext loop and moving the maximum value to the new Runcard_Number, but I am very new to JHeadstart/JDev and I do not know where to put this. I am assuming the BatchSubmitImpl.java, but I'm not sure where to put it or which method to utilize
    I would appreciate any assistance.
    Mary
    U o Windsor

    Mary you're in luck, 'cause, I've been playing with the same thing, these days and found that..
    You can do that in two ways (that I know):
    - by calling a stored function that does max+1 (you can look it up in Dev's guide for Forms&4GLDevs 10g chapter 25.5 Invoking Stored Procedures and Functions)
    - by calling hardcoded or dinamicaly written statement, that does the same
    public Number callStatement(String stmt)
    Number id = new Number(0);
    Row idRow = getDBTransaction().createViewObjectFromQueryStmt(stmt).next();
    if(idRow != null)
    Object o = idRow.getAttribute(0);
    if(o != null)
    if(o instanceof Number)
    id = (Number)o;
    else
    throw new JboException("Conversion error!");
    return id;
    You should call it in
    protected void doDML(int operation, TransactionEvent transactionEvent)
    switch (operation)
    case DML_INSERT:
    // call here
    super.doDML(operation, transactionEvent);
    break;
    case DML_UPDATE:
    super.doDML(operation, transactionEvent);
    break;
    case DML_DELETE:
    super.doDML(operation, transactionEvent);
    break;
    Enjoy!
    S. Julijan

  • SSO for SAP and Non-SAP applications without Enterprise Portal

    Dear all,
    Is it possible to implement SSO for both SAP and non-SAP applications without involvement of EP at all?
    I have gone through this link.
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/e5/4344b6d24a05408ca4faa94554e851/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/e5/4344b6d24a05408ca4faa94554e851/frameset.htm</a>
    But I still i am not able to get the precise answer on how to enable SSO for both  SAP and non-SAP applications without EP.
    We have decided not to implement EP in first phase of SAP implementation. But we need to enable SSO for other SAP and Non-SAP applications.
    A detailed description on how to deal this kind of scenarios will be helpful.
    Thanks.

    A client of our's uses <b>SAP Enterprise Portal</b>, and is using the SAP SSO, which is implemented with tickets, and requires the use of SAPSECULIB.  My company provides an application for this client, and our application in hosted in our data center for the client, as a Software as a Service application, obviously across the internet.  Our client, which owns a SAP license, has asked that we support the SAP SSO as a non-SAP SSO application.  The client user's SSO ticket will be created from SAP EP, and then passed across the internet to our application, and we are to use that SSO ticket as an authentication ticket to our application.  I beleive I know how to do this work technically, having reviewed the SAP document named: "Dynamic Library for Verifying SSO Tickets in Third-Party Software"   Specification   Version 2.00  December 2005.
    My question is, does my company have the right to use the SAPSECULIB?  Where is the official download and <b>license</b> download, that indicates we can download this library, and use it to support a SAP customer?  We do not own a SAP license.  Thank you for your help.  I have searched many places in SAP support.<b></b>

  • How do I deal with "non match"pictures?

    I have a folder that is supposed to keep pictures of my wife only. However these pictures have been joined by others that bear tags for other folders.
    In the left top corner of these "trespassing" pictures there is a circle with a line through it titled "non match"
    How can I stop this happening please?
    Cliff

    Cliffie,
    Make sure that youve deselected Options > Show results that do not match in the Find bar (the third line from the top of the Organizer screen). If that doesnt work, then read this thread:
    John Rolfe Ellis, "Exact match" #1, 30 Apr 2008 11:55 pm

  • Front Row without Apple Remote

    Is there a way to open Front Row without the apple remote?
      Mac OS X (10.4.8)  

    ~*~ You can also press the command key and Esc and front row will open :P Hope this helps ~*~

  • Cannot add row without complete selection of batch/serial numbers while creating Goods receipt purchase order

    Error:Cannot add row without complete selection of batch/serial numbers
           Dim oPDN As SAPbobsCOM.Documents
           oPDN = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
                         Dim serno As String = "SH-A1,SH-A2"
                        Dim sernoval As String() = serno.Split(",")
                        Dim mnfser As String = "SH-B1,SH-B2"
                        Dim mnfserval As String() = mnfser.Split(",")
                        For k = 0 To sernoval.Length - 1
                            oPDN.Lines.SerialNumbers.InternalSerialNumber = sernoval(k).Trim
                            oPDN.Lines.SerialNumbers.ManufacturerSerialNumber = mnfserval(k).Trim
                            oPDN.Lines.SerialNumbers.Quantity = linedetails(iRowNo).Quantity
                            oPDN.Lines.SerialNumbers.SetCurrentLine(k)
                            oPDN.Lines.SerialNumbers.Add()
                        Next
                    oPDN.CardCode = "C232323"
                    oPDN.Lines.ItemCode = "A00004"
                    'oGR.Lines.LineNum = 0
                    oPDN.Lines.BaseLine = 1
                    oPDN.Lines.BaseEntry = 202
                    'oGR.Lines.BaseRef = 203
                    oPDN.Lines.BaseType = 20
                    oPDN.Lines.Quantity = 1
                    oPDN.Lines.UnitPrice = 2
                    oPDN.Lines.WarehouseCode = '01'
                 oPDN.Lines.Add()
                 lRetCode = oPDN.Add

    Hi Vasanth,
    Invert the SetCurrentLine () and Add() at the end of the SSSerialNUmbers loop.
    Regards,
    Eric

Maybe you are looking for

  • EBS 12.1.3 RAC to RAC Cloning with Shared Appl_Top

    BismillahirRehmanirRahim Dear All, I need to Clone our Production EBS Environment from RAC to RAC with Shared APPL_TOP and Multi Tier Appl Tiers. We have EBS 12.1.3 Environment with 2 Appl Tier Nodes with Shared Appl_Top & EBS DB is on 11gR2 RAC 11..

  • Windows 2008 R2 DCs machine account password expiring

    We've a mixed Windows 2008/2003 environment across 30 connected sites. There is a mixture of 2008/2003 DCs. We've had an issue whereby when some of the Windows 2008 R2 DC have been rebooted, they lose there trust relationship with the domain ie we ha

  • WQL query for collection based on file properties not add remove

    Hi I have an issue where a .exe file does not have the updated version number available in add remove programs. The only way I know to get the version number is to right click the file and view version there. I need to make a collection based on the

  • Unable to create partition after RAID setup failure

    SL - Tried to create RAID 1 with two external 250G drives. The RAID setup failed indicating improper format pair. So....I attempted to re-create the partition on one of the drives with proper settings. It will not partition at all. It returns a POSIX

  • Abap 00 and HR SAP classes

    Hi, I am developer and beginner in HR I found many classes for HR in the repository. I think, the most interesting class for me is CL_HRBAS_PLAIN_INFOTYPE_ACCESS because I need to read single infotypes and not all records. The problem is: I found no