Filter factory limitation on clauses?

I have encountered what may be a limitation on the number of clauses in filter factory coding and would like someone to confirm or debunk it.
I have written 12 lines of code, all similar, all containing three && "and" operators, and all ending with the || "or" operator except the last line which ends by concluding an overall "If-Then" statement. The caution icon comes on when the ninth line is added and one of the && signs gets highlighted as the error source. Yet, that line is basically no different in structure from any of the others. Only when I backspace out the ninth and subsequent lines does the caution disappear and the filter respond. 

Here's the code in the R box:
x<128  && y<128    && r>g  && g>b   && (128*b) >(r*x)  ||
x<128  && y<128    && r>b  && b>g   && (128*g) >(r*x)  ||
x<128  && y<128    && r>b  && b>g   && (128*g) >(r*y)  ||
x<128  && y<128    && g>r  && r>b    && (128*b) >(g*x)  ||
x<128  && y<128    && g>r  && r>b    && (128*b) >(g*y)  ||
x<128  && y<128    && g>b  && b>r   && (128*r) >(g*x)   ||
x<128  && y<128    && g>b  && b>r   && (128*r) >(g*y)   ||
x<128  && y<128    && b>r  && r>g    && (128*g) >(b*x)  ||
x<128  && y<128    && b>r  && r>g    && (128*g) >(b*y)  ||
x<128  && y<128    && b>g  && g>r   && (128*r) >(b*x)   ||
x<128  && y<128    && b>g  && g>r   && (128*r) >(b*y)  ? 255:r
Works until I add the last three lines keeping, of course, the If_Then_Else conclusion "?255:r"
If I add any one or two or all of the last three lines, the caution comes on.
The G and B boxes are identical except they end with g and b, respectively. They behave the same way as the R box, as you would expect.

Similar Messages

  • Not able to get current user in PCD Filter factory implementation method

    hi all,
      In the  PCD Filter factory implementation method . i am using the following code
    public Object getObjectInstance(Object arg0, Name arg1, Context arg2, Hashtable env)
         throws Exception
              if (Constants.ASPECT_NAVIGATION.equals(env.get(Constants.REQUESTED_ASPECT)))
              IUser user = (IUser) env.get(IPcdContext.SECURITY_PRINCIPAL);
              String department="null";
              if (user != null)
                 department=user.getDepartment();
                   if ((department != null) && (!department.equals("")))
              filterExpression = "(" + FilterDepartmentService.Department_ATTRIBUTE_KEY + "=" + department + ")";                             
              return filterExpression;
    but i cannot able to get the current user. how to get the current user in the above method..
    Regards,
    Shanthakumar.

    Hi,
      First print the output for env.get(IPcdContext.SECURITY_PRINCIPAL);
    If it returns null, set it from the request object first (from the method where Hashtable is declared and request obj is available) and then use it in this getObjectInstance method.
    env.put(IPcdContext.SECURITY_PRINCIPAL, request.getUser());
    Regards,
    Harini S

  • Filter Factory in Photoshop Elements

    Can the plug-in Filter Factory be used in Photoshop Elements?
    I have PSCS3, not PE. I will be addressing a mixed group of users, the majority probably having only PE. If I demo procedures using FF in PSCS3, can I assure the PE users the procedures can be used by them as well if they download and install FF in PE?

    Thanks.
    You have helped tremendously!

  • Error getting the filter from filter factory

    I created a Service which will filter the iviews on some attributes. I deployed the service on the portal and set the com.sap.portal.pcd.gl.FilterAssignment property to the ServiceKey name on the Page.
    1. When I open the Page, log shows the error:
    "Error getting the filter from filter factory"
    2. I created another servce and when I assigned it to com.sap.portal.pcd.gl.FilterAssignment property, portal still referes the first ServiceKey assigned in Step-I.
    Pls let me know what am I doing wrong.
    Rgds

    Got the bug...Issue closed

  • Mutilple Filter Objects - Changing where clause and or

    Is it possible to have a query as below using filter commands.
    (obj1 = 'value11' and obj2 = 'value21')
    or
    (obj1 = 'value12' and obj2 = 'value22')
    or
    The objective is to manipulate the where clause and , or .
    Thanks in Advance
    Bhanu Mohanty

    Hi Bhanu,
    to reach what you want it's necessary to build a virtual characteristic.
    The new characteristic will be populated via coding during runtime of your query. Another possibility (as mentioned before in this forum by Siegfried Szameitat) is to create a new characteristic in your cube that contains field1 and field2 concatenated. With the first scenario, you don’t need a reloading of your cube, with second one this is necessary.
    Hope this helps.
    Bye,
    Roberto

  • Filter item limits - search not returning any results with large number of elements otherwise ok

    Hi,
    We are working through a problem we've encountered with Azure Search. We are building a filter string based on an "id eq 'xxx' or id eq 'ccc' or id eq 'vvv' etc. The id's are provided in a collection and we loop through, building the string until it's
    ready to apply.
    We are using 2015-02-28 preview at the moment.
    We are encountering a situation where, after approximately 20 id's Azure Search doesn't return any results, nor does it appear to return any error code. I'm pretty sure that the url length is less than 8K.
    Is there any limit on the number of filter elements in a query?

    We followed up offline.
    The symptom in this case was a 200 response with no body. The underlying cause is a URL parsing bug that tries to interpret colons in the query string as the delimiter of a URL scheme (like https:), but with a hard length limit of 1KB. We will work
    on a fix for both the underlying URL parsing issue and the issue that caused it to surface as a body-less 200.
    In the meantime, the workaround is to put colons as close to the beginning of the URL query string as possible. Specifically, putting $filter and facets first, and putting expressions with colons within those first, will mitigate this in most cases.
    Note that the .NET SDK puts $filter and facets near the beginning of the query string by default, so if you're consuming Azure Search you might want to give it a try:
    http://www.nuget.org/packages/Microsoft.Azure.Search/

  • Interactive Reports: Can values for 2nd filter be limited by first filter?

    Hi,
    I have a question for the inbuilt filter tool of interactive reports in apex 4.0.2.00.07. Let's assume my IR data looks like:
    Col1:*Col2*
    A:1
    A:2
    B:3
    If I click on the header of Col1 I will be presented with filter possibilities "A" and "B" and can e.g. set a filter to Col1=A which leaves me with the following view
    Col1:*Col2*
    A:1
    A:2
    Now, if I click on the heading of Col2 to set another filter, I can still select value "3" as well.
    In some cases it would be nice if for any additional filter only those filter values were presented which are still relevant and allow further narrowing of results (like something in the way of LOV cascading). I.e. in our example only "1" and "2", omitting "3". Is there a way to do this?
    Best regards,
    Martin
    Edited by: MBK on Sep 27, 2011 5:35 PM
    Edited by: MBK on Sep 27, 2011 5:37 PM

    Praise goes to Anthony Rayner_ (http://anthonyrayner.blogspot.com/) for a very instructive blog and smooth example applications.
    Anyway, found out what the problem is: Some of my columns are derived from LOVs. In the column 'Report properties > List of Values > Column filter type' my default was 'Use defined list of values to filter exact match', so always all lov entries are available as filters. With e.g. 'Default based on Column type', the application now actually only states values present in the current (potentially pre-filtered) view.
    I guess sometimes it is easy... :-/
    Thanks for the help offered. Nice to see this forum working so smoothly
    BR,
    Martin

  • Filter Records in WHERE clause iReports using values passed from a prgram

    I have searched for iReports manual and what i can see are docs on sale. I have managed to create jrxml file, execute it in jsp and actually view the report.
    Now i have a big list of customers from various branches and have various categories. I would like to know how to pass the parameters so that i retrieve a small list of items. e.g. WHERE cu.branch=200 AND cu.category=10. That is i would like to pass 20 and 10 to the jrxml query stored.
    In iReports i saw parameters, variables and fields but it seems like these are displayable fields.
    How will i achieve this. Am seeking for assistance.
    null

    >
    Please help me to use an associate array in SQL query (WHERE clause).
    select *
    bulk collect into some_array
    >
    there is no variable 'some_array' in what you posted.
    If you want help with your code you have to post the code you are really using, not some hacked-up version of it that has errors.
    Here is sample code that shows how to treat a collection as a table using the TABLE operator
    -- type to match emp record
    create or replace type emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
    -- table of emp records
    create or replace type emp_table_type as table of emp_scalar_type
    declare
    tb emp_table_type;
    deptnoList sys.OdciNumberList;
    BEGIN
    select emp_scalar_type(empno, ename, job, mgr, hiredate, sal, comm, deptno)
    bulk collect into tb from emp;
    SELECT deptno bulk collect
    INTO deptnoList
    FROM dept where deptno not in (select deptno from table(tb));
    for i in 1..deptnoList.count loop
    dbms_output.put_Line(deptnoList(i));
    end loop;
    END;Note that tb is a collection and is useds in the subquery 'select deptno from table(tb)'.

  • Filter not being generated into where clause

    Hi,
    I have a simple mapping that has a source table, a filter, and a target table that is set to DELETE. The source table has many rows, but the filter would narrow down these rows by a lot. When I generate the code, the cursor that gets created SELECTs the whole table then there is an IF statement that is applied to each row with the filter condition. A lot less processing would be required if the filter was implemented as a WHERE clause in the cursor, but I can't get it to generate this way. I realize that deletes automatically generate row-based code but it would still be row-based if the WHERE clause was in the cursor.
    Is there any way to get it to generate the filter as a WHERE clause in the cursor?

    Hi,
    In general, Warehouse Builder gives you a number of different operating modes:
    - set-based: which does everything in (one) SQL statement. This method is most performant, but has some limitations. Warehouse Builder today does not support set-based deletes (arguably, deletes are not the most common operation in a data warehouse).
    - row-based: which is optimal for debugging. In row-based mode, you get as many records as possible and all operations/transformations take place in PL/SQL. This option gives you most debugging capabilities.
    - row-based bulk: which is the previous method fetching rows in bulk (e.g. 100 by 100). Bulk processing speeds up the overall processing.
    - row-based target only: in this mode we push as many of the operations/transformations as possible into the query (cursor). I.e. your filter (in your case) would be implemented as a restriction on the filter.
    - row-based target only in bulk: see previous.
    Warehouse Builder's default operation is set-based fail over to row-based. I.e. because we do not support set-based delete statements, I suspect you fall back to the row-based method of execution, which is not ideal in your case. I suggest you use the row-based target only option in order to get optimal performance for your scenario.
    Note that for the deletes that are common in DW scenarios the row-based bulk deletes that we generate are often faster than set-based deletes. Also note that if you perform a complete delete (or even truncate) followed by an insert that Warehouse Builder does issue one statement for emptying the table.
    Thanks,
    Mark.

  • VERY STRANGE Interactive Report Filter Error

    I have a very interesting problem happening with an interactive report in my APEX application. The report runs just fine and has been in use for about 6 months. Just recently, the users have begun to run into problems when using the filter capability within the report. There is a specific column heading (RH Analyst) that they typically click on and select a specific analyst name (the list contains 10 entries). Most selections from the filter list work fine. However, when one specific name is chosen, they get the dreaded ORA-06502: PL/SQL: numeric or value error: character string buffer too small+*  error. 
    I have been working to narrow the problem down and have found the following:
    1. The filter error is related to the content of one specific column (not the one I am filtering on)
    2. The column that is causing the error is a CLOB datatype
    3. The data in the CLOB column was inserted into the database from a form utilizing an "HTML Editor Standard" type of item
    4. The data in the CLOB column was copied and pasted from an email that was being viewed using Outlook 2007
    5. If I try to recreate the problem with exactly the same information, but copied and pasted from Outlook 2003, I don't experience the problem.
    6. The only people experiencing this problem are people who have upgraded their system from Microsoft Office 2003 to Microsoft Office 2007
    7. When I try to load the form with the data that was stored in the database, I get a 404 page not found error. This is the same error that I get if more than 32k of data was saved into the CLOB.
    The data pasted into the HTML editor from Outlook 2007 (_this is the data that causes problems_) and saved to the CLOB looks like this when I extract it in SQL Developer
    (CLOB) <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta content="Word.Document" name="ProgId" />
    <meta content="Microsoft Word 12" name="Generator" />
    <meta content="Microsoft Word 12" name="Originator" />
    <link href="file:///C:\DOCUME~1\euw6ay0\LOCALS~1\Temp\msohtmlclip1\01\clip_filelist.xml" rel="File-List" />
    <link href="file:///C:\DOCUME~1\euw6ay0\LOCALS~1\Temp\msohtmlclip1\01\clip_themedata.thmx" rel="themeData" />
    <link href="file:///C:\DOCUME~1\euw6ay0\LOCALS~1\Temp\msohtmlclip1\01\clip_colorschememapping.xml" rel="colorSchemeMapping" /><!--[if gte mso 9]><xml>
    <w:WordDocument>
    <w:View>Normal</w:View>
    <w:Zoom>0</w:Zoom>
    <w:TrackMoves />
    <w:TrackFormatting />
    <w:PunctuationKerning />
    <w:ValidateAgainstSchemas />
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
    <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
    <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
    <w:DoNotPromoteQF />
    <w:LidThemeOther>EN-US</w:LidThemeOther>
    <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
    <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
    <w:Compatibility>
    <w:BreakWrappedTables />
    <w:SnapToGridInCell />
    <w:WrapTextWithPunct />
    <w:UseAsianBreakRules />
    <w:DontGrowAutofit />
    <w:SplitPgBreakAndParaMark />
    <w:DontVertAlignCellWithSp />
    <w:DontBreakConstrainedForcedTables />
    <w:DontVertAlignInTxbx />
    <w:Word11KerningPairs />
    <w:CachedColBalance />
    </w:Compatibility>
    <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
    <m:mathPr>
    <m:mathFont m:val="Cambria Math" />
    <m:brkBin m:val="before" />
    <m:brkBinSub m:val="&#45;-" />
    <m:smallFrac m:val="off" />
    <m:dispDef />
    <m:lMargin m:val="0" />
    <m:rMargin m:val="0" />
    <m:defJc m:val="centerGroup" />
    <m:wrapIndent m:val="1440" />
    <m:intLim m:val="subSup" />
    <m:naryLim m:val="undOvr" />
    </m:mathPr></w:WordDocument>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
    DefSemiHidden="true" DefQFormat="false" DefPriority="99"
    LatentStyleCount="267">
    <w:LsdException Locked="false" Priority="0" SemiHidden="false"
    UnhideWhenUsed="false" QFormat="true" Name="Normal" />
    <w:LsdException Locked="false" Priority="9" SemiHidden="false"
    UnhideWhenUsed="false" QFormat="true" Name="heading 1" />
    <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" />
    <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" />
    <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" />
    <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" />
    <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" />
    <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" />
    <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" />
    <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" />
    <w:LsdException Locked="false" Priority="39" Name="toc 1" />
    <w:LsdException Locked="false" Priority="39" Name="toc 2" />
    <w:LsdException Locked="false" Priority="39" Name="toc 3" />
    <w:LsdException Locked="false" Priority="39" Name="toc 4" />
    <w:LsdException Locked="false" Priority="39" Name="toc 5" />
    <w:LsdException Locked="false" Priority="39" Name="toc 6" />
    <w:LsdException Locked="false" Priority="39" Name="toc 7" />
    <w:LsdException Locked="false" Priority="39" Name="toc 8" />
    <w:LsdException Locked="false" Priority="39" Name="toc 9" />
    <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" />
    <w:LsdException Locked="false" Priority="10" SemiHidden="false"
    UnhideWhenUsed="false" QFormat="true" Name="Title" />
    <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" />
    <w:LsdException Locked="false" Priority="11" SemiHidden="false"
    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" />
    <w:LsdException Locked="false" Priority="22" SemiHidden="false"
    UnhideWhenUsed="false" QFormat="true" Name="Stro..."The data pasted into the HTML editor from Outlook 2003 and saved to the CLOB looks like this when I extract it in SQL Developer
    (CLOB) <p style="margin-bottom: 6pt;" class="MsoNormal"><u><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">&ldquo;Implementation and  Compliance Update #2&rdquo;</span></u><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> addresses a concern  that clearinghouses may be in some cases inappropriately charging providers for  the use of a standard transaction. </span><o:p></o:p></p>
    <ul type="disc">
        <li style="" class="MsoNormal"><span style="font-size: 7pt;"> </span><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">In particular, we  cite MN Statutes 62J.536, Subd. 1f, which states that:  <em>Group purchasers may  not impose any fee on providers for the use of the transactions prescribed in  this subdivision.  </em>The update explains that &ldquo;payers (or their agents) may  not charge for receiving a standard transaction&rdquo; and provides additional  information. The update is accompanied by a joint cover memo from MDH, the  Minnesota Department of Commerce, and the Minnesota Department of Labor and  Industry.  Note:  The Minnesota Department of Health (MDH) is charged with  implementing and enforcing Minnesota Statutes, section 62J.536. In addition, the  Minnesota Department of Commerce and the Department of Labor and Industry  administer additional statutory requirements for electronic claims submission,  consistent with MS &sect; 62J.536.</span><span style="font-size: 9pt; font-family: 'Arial','sans-serif';">  <o:p></o:p></span></li>
    </ul>
    <p style="margin-bottom: 6pt;" class="MsoNormal"><u><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">&ldquo;Implementation and  Compliance Update #3&rdquo;</span></u><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> provides a reminder  of the upcoming Dec. 15, 2009 effective date for rules for the standard,  electronic exchange of health care remittance advices. It also clarifies  that:</span> <o:p></o:p></p>
    <ul type="disc">
        <li style="" class="MsoNormal"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Statutory  requirements for standard, electronic remittance advices do not include  requirements for electronic payment (electronic funds transfer &ndash;  EFT)</span><span style="font-size: 9pt; font-family: 'Arial','sans-serif';">  <o:p></o:p></span></li>
    </ul>
    <ul type="disc">
        <li style="" class="MsoNormal"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Consistent with MDH&rsquo;s  enforcement policies and plans described in Update #1 (posted  6/5/09):</span><span style="font-size: 9pt; font-family: 'Arial','sans-serif';">  <o:p></o:p></span></li>
    </ul>
    <p style="margin-bottom: 6pt; margin-left: 1.1in; text-indent: -0.25in;" class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New';">o</span><span style="font-size: 7pt;">        </span><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Starting Dec. 15,  2009, group purchasers (payers) must be able to transmit &ndash; and providers must be  able to accept - standard, electronic RAs via computer-computer electronic data  interchange (EDI). So long as payers and providers are able to exchange the  remittance advice standard transaction electronically, the Department does not  take issue with payers making available additional mechanisms for communicating  RAs to providers, such as access to portable document format (.pdf) files, or  provider electronic mailboxes.</span><span style="font-family: 'Arial','sans-serif';"> </span><o:p></o:p></p>
    <ul type="disc">
        <li style="" class="MsoNormal"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">The Department&rsquo;s  determinations of whether payers and providers are complying with the  regulations will take into account several factors. However, we have determined  that it is not realistic to require electronic remittance advices when claims  ar..."     I am using APEX version 3.2
    Any help would be greatly appreciated. For now, my short term solution for them is to copy the information from Outlook 2007, paste it into a Wordpad, then copy it from wordpad and paste it into the HTML editor control. That seems to work fine but it is not a very nice solution for the users!
    Thanks,
    Dale

    Roel,
    Hey there! Hope you enjoyed your time off ;) Thanks for having a look...
    Yes, of course I "could" update the functions, but this is NOT something I want to do. I'm one of those people that subscribes to Coding by Contract and the assertion routines at the beginning and end of my subprograms are an important part of that.
    This may be a lack of understanding on my part with regards to the order in which Oracle does it's thing - or a bug in Apex... I'm able to duplicate the problem on apex.oracle.com: dmcghan/test/test.
    Log into the demo app with admin/dmcghan. The home page has an interactive report, filter the name and you should get the error. When you look at the query you'll see a filter in the where clause that goes against the apex_collections table. This is populated from the post-authentication procedure. Let me know if you have questions.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur

  • Materialized view with dynamic filter

    I have a query which has a dynamic filter in the where clause. Dynamic in the sense, the value in the where condition will be obtained only when the query is run.
    The user interface is Business Objects tool i am using, based on the user login variable, the query is formed. Is there a possibilty to create a materialized view using this query.
    The query looks like this. The part in BOLD section is the filter. This query is taking long time and hence i am going for materialized view. Please suggest a solution
    SELECT
    DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_5_DESC,
    SUM(case when PERIOD_DIM.FISCAL_PERIOD_NBR = ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_PERIOD_NBR ) and PERIOD_DIM.FISCAL_YEAR=( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR ) then SALES_FACT.NET_SALES_USD else 0 end),
    SUM(case when PERIOD_DIM.FISCAL_PERIOD_NBR= ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_PERIOD_NBR ) and PERIOD_DIM.FISCAL_YEAR=( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR )-1 AND PERIOD_DIM.FISCAL_DAY_IN_PERIOD BETWEEN 1 AND ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_DAY_IN_PERIOD ) then SALES_FACT.NET_SALES_USD else 0 end),
    SUM(case when
    PERIOD_DIM.FISCAL_YEAR=( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR ) then SALES_FACT.NET_SALES_USD else 0 end),
    SUM(case when PERIOD_DIM.FISCAL_YEAR= ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR )-1
    AND PERIOD_DIM.FISCAL_DAY_IN_YEAR BETWEEN 1 AND ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_DAY_IN_YEAR )
    then SALES_FACT.NET_SALES_USD else 0 end),
    SUM(case when PERIOD_DIM.FISCAL_PERIOD_NBR = ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_PERIOD_NBR )and PERIOD_DIM.FISCAL_YEAR=( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR ) then SALES_FACT.MUNITS_SOLD_QTY else 0 end),
    SUM(case when PERIOD_DIM.FISCAL_PERIOD_NBR= ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_PERIOD_NBR ) and PERIOD_DIM.FISCAL_YEAR=( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR )-1 AND PERIOD_DIM.FISCAL_DAY_IN_PERIOD BETWEEN 1 AND ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_DAY_IN_PERIOD ) then SALES_FACT.MUNITS_SOLD_QTY else 0 end),
    SUM(case when
    PERIOD_DIM.FISCAL_YEAR=( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR ) then SALES_FACT.MUNITS_SOLD_QTY
    else 0 end),
    SUM(case when PERIOD_DIM.FISCAL_YEAR= ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR )-1 AND PERIOD_DIM.FISCAL_DAY_IN_YEAR BETWEEN 1 AND ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_DAY_IN_YEAR )
    then SALES_FACT.MUNITS_SOLD_QTY else 0 end),
    SUM(case when PERIOD_DIM.FISCAL_PERIOD_NBR = ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_PERIOD_NBR ) and PERIOD_DIM.FISCAL_YEAR= ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR ) then
    SALES_FACT.CASES_SOLD_QTY else 0 end),
    SUM(case when PERIOD_DIM.FISCAL_PERIOD_NBR= ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_PERIOD_NBR )and PERIOD_DIM.FISCAL_YEAR=( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR )-1 AND PERIOD_DIM.FISCAL_DAY_IN_PERIOD BETWEEN 1 AND ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_DAY_IN_PERIOD ) then SALES_FACT.CASES_SOLD_QTY else 0 end),
    SUM(case when
    PERIOD_DIM.FISCAL_YEAR=( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR ) then SALES_FACT.CASES_SOLD_QTY
    else 0 end),
    SUM(case when PERIOD_DIM.FISCAL_YEAR= ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR )-1 AND PERIOD_DIM.FISCAL_DAY_IN_YEAR BETWEEN 1 AND ( DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_DAY_IN_YEAR )
    then SALES_FACT.CASES_SOLD_QTY else 0 end),
    DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR,
    DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_MONTH_NAME,
    DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_6_DESC,
    DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_7_DESC,
    DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_8_DESC,
    CONCAT (CONCAT(SHIP_TO_CUST_DIM.SOURCE_CUST_NBR,'-'),SHIP_TO_CUST_DIM.SOLD_TO_CUST_NAME),
    CONCAT (CONCAT(SHIP_TO_CUST_DIM.SOURCE_CUST_NBR,'-'),SHIP_TO_CUST_DIM.SHIP_TO_CUST_LOC_NAME)
    FROM
    DM_SALES.SALES_ORG_DIM,
    PERIOD_DIM,
    SALES_FACT,
    DM_SALES.CURRENT_DATE_PERIOD_DIM,
    SHIP_TO_CUST_DIM
    WHERE
    ( SALES_FACT.INVOICE_DATE_KEY(+)=PERIOD_DIM.PERIOD_KEY )
    AND ( SHIP_TO_CUST_DIM.SHIP_TO_CUST_KEY=SALES_FACT.SHIP_TO_CUST_KEY )
    AND ( SALES_FACT.SALES_ORG_KEY=DM_SALES.SALES_ORG_DIM.SALES_ORG_KEY )
    AND ( PERIOD_DIM.PERIOD_KEY<=DM_SALES.CURRENT_DATE_PERIOD_DIM.PERIOD_KEY )
    AND
    ( DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_5_DESC=(SELECT DM_SALES.SECURITY_HEADER.SALES_ORG_POSITION_DESC from DM_SALES.SECURITY_HEADER
    WHERE DM_SALES.SECURITY_HEADER.BOLOGIN = @VARIABLE('BOUSER')) ) AND
    ( PERIOD_DIM.FISCAL_YEAR>=DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR-1 )
    GROUP BY
    DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_5_DESC,
    DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_YEAR,
    DM_SALES.CURRENT_DATE_PERIOD_DIM.FISCAL_MONTH_NAME,
    DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_6_DESC,
    DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_7_DESC,
    DM_SALES.SALES_ORG_DIM.POSITION_LEVEL_8_DESC,
    CONCAT (CONCAT(SHIP_TO_CUST_DIM.SOURCE_CUST_NBR,'-'),SHIP_TO_CUST_DIM.SOLD_TO_CUST_NAME),
    CONCAT (CONCAT(SHIP_TO_CUST_DIM.SOURCE_CUST_NBR,'-'),SHIP_TO_CUST_DIM.SHIP_TO_CUST_LOC_NAME)

    You could potentially create a single materialized view that had no restriction on the BOLOGIN column and allow Oracle to use that materialized view to be used to satisfy requests from the different users. You may need to add appropriate indexes to the materialized view for that to be a reasonable option, depending on how many distinct BOLOGIN values you expect.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Calling function in where clause

    <BR>
    Hi
    I receive a string of form '333,444,55R5,B342,A556' as string value which should be passed to condition check to filter records in where clause of query.
    to make string form in right format with proper quotes separated i have written one function which does that job
    CREATE OR REPLACE FUNCTION DW.F_TASK(P_VAL VARCHAR2) RETURN VARCHAR2 AS
    V_VAL VARCHAR2(4000);
    V_VAL1 VARCHAR2(4000);
    BEGIN
    V_VAL1:=REPLACE(P_VAL,',',''',''');
    V_VAL:='('||''''||V_VAL1||''''||')';
    DBMS_OUTPUT.PUT_LINE(V_VAL);
    RETURN V_VAL;
    END F_TASK;
    When i fire below query it doesnt give me output
    SELECT * FROM CONTRACT_TABLE WHERE
    CONTRACT_NUMBER IN F_TASK('333,444,55R5,B342,A556');
    when i fire below query
    SELECT F_TASK('333,444,55R5,B342,A556') FROM DUAL
    below is the output
    ('333','444','55R5','B342','A556')
    note: above output holds quotes now.
    Issue: when i pass paratmeters directly to funciton then i could see output with brackets but when i use same funciton with parameters iin query i dont see data afer firing the query.. though i have those contract numbers in the table.
    Please help how to acquire this
    Thanks,
    Naren
    </BR>

    You haven't described your problem clearly (see: {message:id=9360002})
    However, it sounds like you want a varying IN list, which is also in the FAQ: {message:id=9360009}

  • Using FILTER function in oracle answers

    Gurus,
    I have a question related to using Filter function in oracle answers.
    When trying to insert a Filter (expr) Using (expr) clause in the formula area of a fact table field, It errored out with msg saying about using a wrong measure.
    I know this can be done with a case expression but I tried filter clause since this is available in oracle answers.
    Please help me figuring out this scenario.
    Thanks.

    David / Raghu - Thanks for u'r replies and apologizes for not posting question with proper material.
    Am posting my code and the error message from the screen.
    Code :
    IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0)
    Error :
    nQSError: 10058] A general error has occurred. [nQSError: 22032] Function FILTER requires at least one measure attribute in its first argument. (HY000)
    SQL Issued: SELECT "Dim - MBS Loan"."LOAN AMOUNT", "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK", "Dim - MBS Loan"."LOAN TYPE SEN/SUB", "Dim - MBS Project"."PROJECT NAME", "Dim - MBS Project"."PROJECT NUMBER", "Fact - MBS Loan Transactions"."AR BALANCE INTEREST", "Fact - MBS Loan Transactions"."GL BALANCE INTEREST", IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0) FROM "Financials - MBS"
    OK (Ignore Error)
    Please continue answering my queries. Since am a newbie your answers won't be just a reply but it's actually learning for me.
    Thanks.

  • Need help with a filter to use in Photoshop CS5

    I am a novice so please be  patient.  Over the past 15 years or so I have been using a simple filter  that I created in Filter Factory to do some analysis on aerial  photographs.  I am way behind on updates (currently using Photoshop CS  (version 8)).  I want to upgrade and am using a trial of CS5.  After  talking with customer support I've found there is no way to use this  filter in CS5 and Filter Factory is no longer supported in the Photoshop  suite.  Can someone help me to create the same filter in Pixel Bender  to use in Photoshop CS5?  I will share the details of the filter if  someone responds.
    Thanks!

    Is the result a one channel image? The Pixel Bender language currently supports one and two channel images, in addition to three and four channel images, but unfortunately the tools do not. You should be able to fake the one channel output by marking only a single channel of a three or four channel image. In any case, give the filter, below, a try. It may not do exactly what you want but it should get you most of the way there. You'll want to duplicate it and modify the arithmetic to satisfy the second filter algorithm once you've got the filter tuned to fit your needs.
    <languageVersion: 1.0;>
    kernel RPlusGDivRMinusG
    <
        namespace: "pixelbender::forum::support";
           vendor: "aif";
          version: 1;
    >
        input  image4 src;
        output pixel4 dst;
        void
        evaluatePixel()
            float4 pointsample = sampleNearest(src, outCoord());
            float  graychannel = (pointsample.r + pointsample.g) /
                                 (pointsample.r - pointsample.g);
            dst = float4(graychannel, 0, 0, pointsample.a);

  • How to filter on an aggregate measure but before aggergation is applied?

    Hi,
    When I include a measure in filter section (for eg: sale_amount > 10000 ), while having marked the measure with default aggregation as SUM in the BMM layer of RPD, I see the filter gets applies on the aggregated value. ie, the filter is applied after aggregating the sale_amount. But the requirement is to filter and identify the rows with sale_amount > 10000 and then aggregate. To accomplish this, I do not want to expose sale_amount two times in the presentation layer (once with aggregation enabled in BMM and another without aggregation), as this will confuse my power user community.
    How can this be done?
    Thanks,
    SD

    Hi SD,
    Try using 'FILTER USING' on your measures column for this requirement. This one sends the filter as a where clause in the query, by which the database would apply the where clause first to retrieve the records then would perform a summation on it.
    Hope this helps.
    Thank you,
    Dhar

Maybe you are looking for

  • Mail Won't Open At All

    Hello, I bought the 13-inch i5 Macbook Pro about 3 or 4 weeks ago, and it is Lion. Mail would crash, even when just opened. I have never sucessfully opened Mail on my computer. The mail didn't crash in the middle of reading emails, when I click the i

  • Formatting - How to print a frame on the bottom of  the last page ?

    I have a summary frame for my report. I want to print the summary information at the bottom of the last page of the report. Currently depending on the data, the summary frame prints anywhere on the last page. How do I make sure it prints exactly at t

  • Video in indesign to PDF

    I'm trying to export a file to pdf from indesign that has video with type placed over the top. After exporting and viewing in acrobat, I can view the video but not the type. Can anyone tell me what I'm might be doing wrong?

  • Adobe flash player and windows 7 IE 10

    Why can't I download Adobe flash player with windows 7 64 bit IE 10 64 bit ??????

  • Need info for lost back cover to my 9800

    i lost my back cover on my 9800 and need to find a replacement. how and where do i find one.