How to combine two conditions :  Exists and Item not null ?

Hello !
I have a flash chart region that I would like to display only if two conditions are both true.
The first condition is this one :
Exists (SQL query returns at least one row) :
select 1
from    observatoire.fiche aa, observatoire.activite_faite bb
where   aa.fiche_id = bb.fiche_id
and     bb.fiche_id = aa.fiche_id
AND     bb.activites_id = TO_NUMBER(:P23_ACTIVITES_ID)
AND     TRUNC(aa.date_activite, 'YYYY') = TRUNC(TO_DATE(:P23_ANNEE, 'YYYY'), 'YYYY')And the second condition would be :
Item not null :
P23_ACTIVITES_IDHow to combine these two conditions into one display condition ?
Thank you .
Christian

Hello,
The issue is that you're doing -
TO_NUMBER(:P23_ACTIVITES_ID)When you leave the Null return value blank like that, you'll typically see '%null%' used in session state (i.e. it's not actually null). Obviously '%null%' can't be converted to a number, hence the error you're seeing.
A simple solution would be to make your null return value -1 or some other value that is guaranteed not to be a valid id (and alternative is to convert the %null% to a real null via an App/Page process etc (if you search this forum you'll find a few examples on how to do that). Another alternative is to use a DECODE to detect the '%null%' etc.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Similar Messages

  • How To combine two Itunes libraries, and run Itunes off of external device

    Hi,
    I have a very blonde question to ask. I have the ipad2 (now very old) and a Macbook Air - Currently I have one itunes library on my Macbook Air, and one on my itunes - not sure how I did that, but here we are.
    I would like to combine both the libaries - as one seems to have my older apps, all my music and movies, and the other on my Macbook air seems to have all my newly downloaded apps.
    How do I merge both of them so that all my info is in once place, and how do I get my itunes to run back off of the external device, as there is not enough space on my macbook air.

    By "device" I presume you mean your iPad?
    Computers running iTunes are intended to be the master source for your collection.  i-devices are designed to be synced from a computer's collection.  They are not intended to be the main repository of your collection.  If you need that, consider buying an external hard drive for your media collection.  You can transfer items purchased from Apple from a device to a computer, but depeneding upon your country and iCloud availability you should also be able to download them from the iTunes Store to your computer again too.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - this is just purchased music, not all
    Downloading (using iOS or computer) past purchases from the App Store, iBookstore, and iTunes Store - http://support.apple.com/kb/ht2519 - enabled with iTunes 10.3 and newer; not all media formats are available in all countries (see: iTunes in the Cloud and iTunes Match Availability by Country - http://support.apple.com/kb/HT5085 ); apps, books (not audiobooks), music, t.v. shows, and movies (some - not all studios have permitted this).  Downloading previously purchased movies and TV shows requires iTunes 10.6 or later.  Discontinued items not available. For items not included in the iCloud list (e.g., ringtones, audiobooks), or locations or computer systems where iCloud is not (yet?) available, you only get one download per fee paid.  Apple recommends  "you always back up your iTunes library in the event that a purchased item is no longer available on the iTunes Store."

  • How to combine two reports in obiee 10g(not union)

    Hi Everyone
    I have got a requirement where client is asking to combine two report to one
    Report A has columns
    "Region", "category" ,"in house " ,"sales" which can be shown by applying filters for current running year
    Report B
    Region,Category, Week5,week6, week7,week8 in this showing sales in individual week by using pivot view and limiting to four weeks
    with a week filter
    Now client req is to combine both reports into single one
    region, category,inhouse,sales,week5,week6,week7,week8 here the issue is inhouse and sales data has show yearly data and week 5,week6,week7,week8 has to show weekly data .And weeks columns has to get updated automatically .
    I am having a confusion in this will it possible to combine both reports, if possible pls help out how to do it
    Regards
    Sandeep
    Edited by: Sandeep on Jul 31, 2011 9:20 AM
    Edited by: Sandeep on Aug 1, 2011 1:43 AM

    First of all, proof read your post. Generally, grammatical and punctuation errors can be deciphered, but where words are critical to presenting your issue clearly, you must type those sentences correctly. Otherwise, it can be confusing and turn off someone who may want to help.
    "...which can be shown without and filters and want data for current year." What does this mean?
    "...And weeks columns have to update its week no based on that week." What does this mean?
    In an attempt to answer you question, do this:
    1) Base your query filters on the "current running year." This will satisfy the requirements for displaying data from the first report.
    2) Now add 4 "sales" columns (i.e., same column, but 4 instances of it). In each of these columns, click on the fx button, click on Filters, go to your Time dimension and select the appropriate week, and then click "OK." Now, each of these columns will hold the measure value for the particular week while the "sales" column will have the "running total" for the whole time period.
    Once you get the above to work, you can work on automating this by substituting a function in place of the hard-coded week number values.

  • How to combine two datarows (business component data) in BI Publisher

    Hi ,
    We are using BI Publisher in Siebel Environment.
    We have data coming from two business components (like from 2 diff tables)
    a) <?for-each:ssTest1?>
    b) <?for-each:ssTest2?>
    ssTest1 and ssTest2 are the business components
    We need to combine these 2 datarows (a&b) and show the data into a single combined data row for ex like <?for-each:ssTest1ssTest2?> and show all the fields in that.
    I'm not sure how we can combine these two data rows into a single combined data row and show the data.
    Any help from any one would be apprecated.
    Thanks
    PV
    Edited by: user8633002 on Oct 21, 2010 4:05 PM

    Hi sajid
    There was nothing more description about your issue in this site and I found an issue below is mostly like yours
    http://www.codeproject.com/Questions/855487/how-to-combine-two-table-value-in-rdlc-report
    In the issue above, if you want to show the two other tables in the report, I think you could combine the tables into one datatable joining on key. The link below show an example of a DataSet Helper from Microsoft about combine DataSets. Take note of
    the related content for other DataSet Helper examples. And then you could use the datatable in your RDLC.
    # HOW TO: Implement a DataSet JOIN helper class in Visual C# .NET
    http://support.microsoft.com/kb/326080/en-us
    In an alternative way, I think you could create a view in the database which combine your tables and use it in your rdlc.
    In addition, your issue is about asp.net and you could get more support in the asp.net forum whose link as below.
    http://forums.asp.net
    Best Regards
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • How many types of tables exists and what are they in data dictionary?

    hi,
    How many types of tables exists and what are they in data dictionary?
    regards.

    Hello Liu,
    Please search in forum before posting any question .
    anyhow check the below link :
    http://web.mit.edu/sapr3/dev/sap_table_types.htm
    Thanks
    Seshu

  • How to update cost condition VPRS and Updation from VPRS to new cond ZVPR

    Hi All,
    How to do and is there any way to update the VPRS cost condition whenever vendor sends confirmation of material and cost after purchase order.
    After receiving the confirmation form the vendor,the VPRS cost condition should get updated in the system automatically.
    We have one cost condition type ZVPR which is same and consists of same properties of VPRS. How to update this ZVPR condition from VPRS Condition.
    Thanks in advance....
    Regards....Venkat
    Edited by: venkat t on Feb 16, 2009 11:57 AM

    Hi venkat
    Check the link
    [How to update cost condition VPRS and Updating from VPRS to new cond ZVPR;
    NOTE : Dont post in many forums
    Regards
    Srinath

  • How many types of Queues exists and how to identify them.

    Hello
    can anyone say How many types of Queues exists and how to identify them.
    What does R3R* and CSA* stands for.
    Regards,
    divya

    Hi Divya,
        The queues R3* and CSA* that you have specified are qRFC queues. qRFC queues are data queues which transport data to and fro different systems.
    There are also the tRFC queues which are triggered whenever you make RFC calls to connect to another system.
    Queues with prefix R3AD* - for delta download from R3->CRM
    Queues with prefix R3AU* - for data upload from CRM->R3
    Queues with prefix R3AR* - used to transfer data during request load from R3->CRM
    Queues with prefix R3AI* - for initial load from R3->CRM
    Queues with prefix CSA* - these are validation object specific queues used for processing/persisting data in CRM tables in a serialized manner. E.g. CSABUPA* for business partner,CSA_ORDER* for sales order etc.
    You can administer and monitor the queues in trax. SMQR,SMQS.
    Hope this helps you! Pls. do not forget to reward me some points.
    Regards,
    Sudipta.

  • Under what conditions  ALL Objects exists and does not exists

    When does the ALL Objects exists in Database
    For Eg: ALL_TAB_COLUMNS , ALL_USERS etc
    When it does not exists
    For Eg : ALL_SEGMENTS which does not exist and only options are USER_SEGMENTS and DBA_SEGMENTS.
    There should be some rules for its existence and its non existence and under what conditions it exists and does not exists .
    Please explain.

    Its clearly stated in Oracle documentation.
    An ALL_ view displays all the information accessible to the current user, including information from the current user's schema as well as information from objects in other schemas, if the current user has access to those objects by way of grants of privileges or roles.
    A DBA_ view displays all relevant information in the entire database. DBA_ views are intended only for administrators. They can be accessed only by users with the SELECT ANY TABLE privilege. This privilege is assigned to the DBA role when the system is initially installed.
    A USER_ view displays all the information from the schema of the current user. No special privileges are required to query these views.
    Edit: formatted the post :)

  • Item text and item note are not transfering from SRM to ECC on to PR

    Hello Expers!!!
    Due to some requirement we added some logic in BBP_CREATE_BE_RQ_NEW to print the used ID of the shopping cart creator on PR under item text requisitioner tab. but after moving these changes to production the item text(Vendor text) and item note(internal note) which are maintained in the shopping cart are not printing on the Purchase requisition under item text and item note tabs. these two texts were printing correctly before moving our changes.
    please suggest me how this item note and item text will print on PR. Is it a standard functionlity in SRM 5.0?
    is this because of move over changes?
    suggest me to resolve the issue....
    thanks in advance...
    Regards,
    CD Reddy

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • HT4623 The update to iOS 7 is frozen at the Terms and Conditions page and will not move no matter what I click on.  I cannot access my iPad as it is frozen on this screen.

    The update to iOS 7 is frozen at the Terms and Conditions page and will not move, no matter what I click on.  I cannot access my iPad as it is frozen on this screen.  How do I remedy this nightmare?

    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    Then try updating the software again.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    No data is lost due to a reset.
    Same advice helped this user for the same issue >  HT1414 tried to update to latest iOS...: Apple Support Communities

  • Utl_file.open_file question to check if a file exists and is not empty

    Hello,
    I am trying to write a code where in 3 seperate files are created based on some parameter condition for the extract call.
    Say the parameters are NULL, 'A' and 'B'.
    When Null condition is passed to the extract call then it should create file A and B if records are found. If not it should create empty files.
    It is possible that the parameter to the extract is just 'A' then it would create A with say non zero file and B with zero file.
    Now when the extract is called with 'B' parameter and if the file A already exists and is not empty then I should not touch/overwrite it with empty records.
    Is there any simple way that I can do this to check if a file exists and is non empty?
    I am using
    open_file
    ( gv_utl_file_path
    ,lv_file_name
    ,lv_file_handle
    Please help.
    Thanks

    @OP : No Need to open
    SQL> declare
      2   lb_file_exist boolean;
      3   ln_size number;
      4   ln_block_size number;
      5  begin
      6   sys.utl_file.fgetattr('TEST_DIR','a.txt',lb_file_exist,ln_size,ln_block_size);
      7   if lb_file_exist then
      8    dbms_output.put_line('a Exists');
      9    dbms_output.put_line(to_char(ln_size));
    10   else
    11    dbms_output.put_line('a Not Exists');
    12   end if;
    13   sys.utl_file.fgetattr('TEST_DIR','b.txt',lb_file_exist,ln_size,ln_block_size);
    14   if lb_file_exist then
    15    dbms_output.put_line('b Exists');
    16    dbms_output.put_line(to_char(ln_size));
    17   else
    18    dbms_output.put_line('b Not Exists');
    19   end if;
    20   sys.utl_file.fgetattr('TEST_DIR','c.txt',lb_file_exist,ln_size,ln_block_size);
    21   if lb_file_exist then
    22    dbms_output.put_line('c Exists');
    23    dbms_output.put_line(to_char(ln_size));
    24   else
    25    dbms_output.put_line('c Not Exists');
    26   end if;
    27  end;
    28  /
    a Exists
    0
    b Exists
    3
    c Not Exists
    PL/SQL procedure successfully completed.Edited by: jeneesh on Mar 30, 2012 1:21 AM

  • On i-pad, when try to enable itunes match, it says, "you are not currently subscribed to iTunes Match. Use iTunes on your computer to subscribe." I am subscribed though! Then it says no my request and item not available in the U.S. store. WWJD?

    On i-pad, when I try to enable itunes match, it says, "you are not currently subscribed to iTunes Match. Use iTunes on your computer to subscribe." I am subscribed though! Then it says no to my request and, "item not available in the U.S. store." My Mac will not use update iTunes to any later version than the one I have because my os is also out of date, but when I try to update that i cant, so what do I have to do?  Please don't tell me I have to buy a new Mac to be up to date.

    On the iOS device you must be logged into the store with the exact same Apple ID you used to originally purchase the service. Go to Setting > iTunes &amp; App Stores and if necessary sign out/in and then enable iTM.

  • I don't know how to use the canlendars function and the notes are kind of messy code,anyone help me

    i don't know how to use the canlendars function and the notes are kind of messy code,anyone help me

    Step by step:
    1. On your main vi Front Panel, create your boolean indicator.
    2. On the block diagram, right click the new boolean indicator and select Create - Reference.
    3. On sub-vi front panel, create boolean indicator (or use one that is already created).
    4. On sub-vi front panel, create a reference (Controls Palette - Refnum - Control Refnum).
    5. Right click on the newly created Refnum and select Select Vi Server Class - Generic - GObject - Control - Boolean. The refnum label changes to BoolRefnum.
    6. On sub-vi block diagram, create Property Node (Functions - Application Control - Property Node). Find the BoolRefnum and move it close to the new Property Node.
    7. Wire the BoolRefnum to the reference input of the property node.
    8.
    Right click on the property node and select Change to All Write.
    9. Move mouse to point to Visible inside property node box, left click and select Value.
    10. Wire the boolean indicator from step 3 to the Value input of the property node.
    11. On sub-vi front panel, right click on icon and select Show Connector.
    12. Click on empty connector spot then click on the new BoolRefnum. Save your sub-vi.
    13. On main vi block diagram, connect refernece created in step 2 to the new connector terminal of sub-vi.
    14. Save and run.
    Here are the modified vi's.
    - tbob
    Inventor of the WORM Global
    Attachments:
    Pass_a_Reference.vi ‏20 KB
    GL_Flicker_mod.vi ‏83 KB

  • Error :This database already exists and is not a supported version of MBAM.

    While installing MBAM 2.0 SP1 i get the following error ,screenshot is attached.
    This database already exists and is not a supported version of MBAM.
    System set-up
    Server 2012 on which SQL 2012 SP1 is installed.
    Adding MBAM Audit , recovery and compliance features.

    Change the name of the database to:-
    - For Recovery database - "MBAM Recovery and Hardware"
    - For Compliance Database - "MBAM Compliance Status"
    While installing the MBAM DB features and then try. Don't change the default names or use any custom name for DBs.
    Gaurav Ranjan

  • I went in you tube and watched videos on how to fix my headphone jack and its not the headphones cause when I look inside I see this little white costing in there I think that's the problem how can I fix it

    I went in you tube and watched videos on how to fix my headphone jack and its not the headphones cause when I look inside I see this little white costing in there I think that's the problem how can I fix it

    - Try cleaning out/blowing out the headphone jack. Make sure that y do not leave any foreign material or leave anything in the jack. Try inserting/removing the plug a dozen times or so.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar
    If not under warranty Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price                  
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

Maybe you are looking for