How to bring all records

hello,
i have the following line in a query:
AND (mmt.ATTRIBUTE1)= NVL(:P _Subject,mmt.ATTRIBUTE1)
It gives me only the not null "mmt.ATTRIBUTE1" records when the parameter is not entered.
How can i modify this in order to bring all the records even where the column mmt.ATTRIBUTE1 is NULL
Thank you..

Thank you. Thank you. Thank you....
It finally worked.
You can find the entire select statement below as per your request...
SELECT
DISTINCT mmt.transaction_id ,
mmt.organization_id ,
mmt.transaction_type_id ,
mmt.inventory_item_id ,
sib.segment1           ,
sib.description ,
mtt.transaction_type_name ,
mmt.subinventory_code ,
mmt.locator_id ,
mmt.transaction_reference ,
mmt.transaction_date ,
sib.primary_unit_of_measure,
ABS(mmt.primary_quantity) ,
mmt.TRANSACTION_SET_ID
,mta.REFERENCE_ACCOUNT
,mmt.ATTRIBUTE1          "Subject"
,mmt.ATTRIBUTE2          "Remarks"
FROM
mtl_material_transactions mmt,
mtl_system_items_b sib,
mtl_transaction_types mtt
,MTL_TRANSACTION_ACCOUNTS     mta
,gl_code_combinations gcc
,fnd_currencies fc
,org_organization_definitions ood
,gl_sets_of_books gsob
WHERE 1=1
AND ood.set_of_books_id = gsob.set_of_books_id
AND fc.currency_code = gsob.currency_code
AND mmt.ORGANIZATION_ID=ood.ORGANIZATION_ID
AND mmt.organization_id = sib.organization_id
AND mmt.inventory_item_id = sib.inventory_item_id
AND mmt.transaction_type_id = mtt.transaction_type_id
AND DECODE(mmt.transaction_type_id,2,mmt.Transaction_quantity,-1) < 0
AND mta.TRANSACTION_ID= mmt.TRANSACTION_ID
AND mta.reference_account = gcc.code_combination_id
AND ood.set_of_books_id = gsob.set_of_books_id
AND fc.currency_code = gsob.currency_code
AND mmt.ORGANIZATION_ID=ood.ORGANIZATION_ID
AND TRUNC(mmt.transaction_date) = NVL(:date_from,TRUNC(mmt.transaction_date))
AND TRUNC(mmt.transaction_date) = NVL(:date_to,TRUNC(mmt.transaction_date))
AND NVL(mmt.transaction_reference,'X') = NVL(:trx_ref,NVL(mmt.transaction_reference,'X'))
AND NVL(mmt.ATTRIBUTE1,'xyzabc123')= NVL(:P_Subject,nvl(mmt.ATTRIBUTE1,'xyzabc123'))
AND mmt.organization_id = NVL(:orga_id,mmt.organization_id ) ;
Thanks again...

Similar Messages

  • How to bring all columns in a single/first page in report painter

    Hi Experts,
    There are 9 columns in a report painter which includes 1 lead column.
    7 columns comes in a first page including lead column and rest 2 columns goes to second page. This report is copied from another report where all columns comes in a first page only. if the original report comes in one page then why not the new report.
    Please suggest how to bring all columns in a single/first page in the new report.
    Please revert if I'm confused anywhere.
    Thanks in advance
    Arabinda

    Hi Rajneesh,
    Thanx for the quick reply. When I change the column width to 10 it comes in one page. But the requirement is to keep the column width to at least 12 or 14 and moreever the original report from where this report is copied having the same no of columns and the column width for original report is 14 and it comes in one page only.
    Do I need to do something more to achieve this. My question is how the original reports data comes in one page where as the current report having issue with same number of columns.
    Pls suggest.
    Thanx,
    Arabinda

  • How to inlcude all records in a report, with a formula result of 0 or 0?

    I'm reporting on classes scheduled for a certain location, and calculating the number of available seats per class. A formula will give me the net seats available (Max seats-count of students). BUT if there are no students enrolled, class does not appear on the report. Formula is {SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs)
    What am I missing? Currently using Crystal 8.5 and reporting against a SQL database.
    Appreciate your help.
    christi

A: How to inlcude all records in a report, with a formula result of 0 or >0?

thanks, Sanjay - been there done that.
basically, I need to show the net result for the open seats available,which will be the same as the max seats offered.
I tried the following:
If Isnull{WAITING_LISTS.no_emp}
then {@Open}={SCHEDULES.qy_sch_max}
else
{SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs})
and got a message "Missing the then".  (@Open is the formula title)

thanks, Sanjay - been there done that.
basically, I need to show the net result for the open seats available,which will be the same as the max seats offered.
I tried the following:
If Isnull{WAITING_LISTS.no_emp}
then {@Open}={SCHEDULES.qy_sch_max}
else
{SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs})
and got a message "Missing the then".  (@Open is the formula title)

  • How to show all records by default on search result page?

    Hi
    I am trying to make a search page that would execute the search in the database based on one or more field constraints.
    (Using MySQL,PHP)
    I have  2 columns in the database "vm_ip" (primary key) <IP address>, "Operating_System" <Any, Windows, Solaris, AIX>
    need to search vm_ip based on other two fields.
    PROBLEM: Need to show all the record when I select "Any" in the Operating_System  drop down menu.
    <p>Operating System:
        <select name="os_select" id="os_select">
        <?php
    $os_count=1;
    foreach($os_type as $value) //(os_type is array with possible values of OS)
    echo "<option value=".$os_count.">".$value."</option>";
        $os_count++;
    ?>
          <option value=" " selected="selected">Any</option>
        </select>
      </p>
    this code POSts  NULL value to the search page.
    Below code is of recordset on  search page
    $varOS_virtual = "Operating_System"; // recordset variable set to same as column name (default value)
    if (isset($_POST['os_select'])) //this should not be true
      $varOS_virtual = $_POST['os_select'];
    mysql_select_db($database_xyz_db, $xyz_db);
    $query_virtual = sprintf("SELECT table.VM_IP FROM table
    WHERE table.Operating_System=%s", GetSQLValueString($varOS_virtual, "int"));
    $virtual = mysql_query($query_virtual, $xyz_db) or die(mysql_error());
    $row_virtual = mysql_fetch_assoc($virtual);
    $totalRows_virtual = mysql_num_rows($virtual);
    I expected the 'os_select' field to be null and default value of Operating_System to be "Operating_System" so that the Query shows all records.
    But instead the value being passed in the Query is "0". and no records are shown.
    What can I do to show all records?
    As probably obvious I am new to php/MySQL so all the help is most welcomed .
    Thanks

    Hi
    Thanks for the prompt reply but this does not solve my problem.
    First thing I appologise for giving you incorrect info. Actually I have many more constraints on the search apart from OS.
    Didn't think I would get single constraint specific ans.
    Here is what all i tried and problems I faced:
    1. I cannot use seperate queries cause I have around 7-8 other constraints on the search.
    2. I cannot play around with the Record set code. For some reason even if I mess with it a little bit Dreamweaver stops recognising the recordset. for eg i tried the below code:
    $query_virtual = sprintf("SELECT table.VM_IP FROM table WHERE
    table.Operating_System=%s ,($_POST['os_select']=="")? TRUE:GetSQLValueString($varOS_virtual, "int"));
    this ran well for the first time, and then the record set was screwed up. kept on asking me to "Discover" the links, which it couldn't do.
    3.  take a look at this code:
    $varOS_virtual = "Operating_System";
    if (isset($_POST['os_select'])) {
      $varOS_virtual = $_POST['os_select'];
    $varState_virtual = "State";               //second constraint
    if (isset($_POST['state_select'])) {
      $varState_virtual = $_POST['state_select'];
    mysql_select_db($database_xyz, $xyz);
    $query_virtual = sprintf("SELECT table.VM_IP FROM table AND table.Operating_System=%s AND State=%s",
    GetSQLValueString($varOS_virtual, "int"),GetSQLValueString($varState_virtual, "int"));
    $virtual = mysql_query($query_virtual, $xyz) or die(mysql_error());
    $row_virtual = mysql_fetch_assoc($virtual);
    $totalRows_virtual = mysql_num_rows($virtual);
    here on passing NULL value for "Any"  GetSQLValueString($varOS_virtual, "int") functions returns NULL and though the Default value of
    varOS is set to 'Operating_System" query takes NULL value only which when executed shows no records.
    My problem majorly revolves around how to put something like "WHERE Operating_System= Operating_System" OR  "WHERE Operating_System= TRUE" in the query, when passed through variable they are sent as Strings or NULL.
    Thats why WHERE 1=1 also doesnt work, because it has "WHERE Operating_System= NULL" in AND.
    Logically when NULL is passed default value of variable should comeinto picture, but tha isnt happening.
    Thanks again for answering. hope I was able to explain my problem.

  • How to SELECT ALL records of a TABLE VIEW in the BSP page

    Hi All,
    In the BSP portal, I am displaying some data(multple records) in the form of a table using the BSP TAG <htmlb:tableView>. I wrote the logic in the 'VIEW' of the BSP application which will be triggered by the controller. I have used the attribute selectionMode = "MULTISELECT" to have a Check Box to select a row.
    My requirement is to have a button/checkbox on the first column of the header of the table view. By clicking on this, it should select/desect all the records of the table. Could someone please help me how to do this? What attribute I should use in the tableview to get the button in the header row of the table and how to select all the records of the table.?
    Please provide your valuable inputs.
    Thanks & Regards,
    Paddu.

    Select all / Deselect all functionality when onRowSelection is there

  • Camileo S20 - How to play all recorded videos?

    hi all!
    Ive not long had the camileo s20, so still trying to get mt head around it. I think ive managed the basics but im having a problem with play back.
    When i recored a video - 6 mins long, but i pause the recording half way through, then go back on to start recording where i left off, during play back it will play the movie sepratlely and i manualy have to start the other half of the video to play.
    Is there anyway i can just click play and it plays all my recorded videos continuously? a play all setting?
    Thanks

    Hi wayne_1,
    First of all I can recommend checking the user manual. It contains a lot of informations about your camera and how to use all features.
    I have checked the user manual but unfortunately I think such a playback function isnt available. With the playback button you can switch to playback mode and use the left and right button to go to the next picture/movie.
    But there is no function about playback of all videos.

  • How to get all records created this month?

    Ok I'm trying to write a query that would get records that were created this month or later but not in the past.
    So today is Nov 16th 2009
    I need to look for all records created from 11/2009 and onward (>11/2009)
    Any ideas?

    Do you have any field like "create_date" on that table ? Here is simple qry
    with t as ( select 1 as id,to_date('01-OCT-2009','DD-MON-YYYY') as create_date from dual
    UNION
    select 2,to_date('11-OCT-2009','DD-MON-YYYY') from dual
    UNION
    select 3, to_date('02-NOV-2009','DD-MON-YYYY') from dual
    UNION
    select 4, to_date('01-NOV-2009','DD-MON-YYYY') from dual
    UNION
    select 5, to_date('13-DEC-2009','DD-MON-YYYY') from dual)
    select * From t
    where CREATE_DATE >= trunc(sysdate,'MON')Edited by: rkolli on Nov 16, 2009 1:23 PM

  • How to print all records in database ?

    Hello,
    I am developing a small Database System. Which is used to store some information about student and then print that record, which I want to print. I have used JPanel for Printing single record. As like When I insert student id in TextBox. which is unique. then Click on Search button that is use for searching Record from database. After that the information shown in belowing JPanel. Then using one button for printing this record. It is printing only one record that I have searched. Now what is the problem, I want to print All record from database(can be 500 or 5000) without mentioning any student id in textbox.
    Any type of help Appreciated.
    Thanks in advance.
    Manveer

    Hello Manveer,
    your problem is neither Swing-related or in any other way java specific.
    If you manage to get the data of one student, excellent. Now modify your db-query in the way that the result set returns all students. Loop over the result set and print as usual.

  • How to show all records (instead of unique records) in OBIEE Answers

    I am a newbie of OBIEE and have below question.
    The fact table has 3 fields:
    ID (Primary Key)
    Status (either 'open' or 'close')
    Amount
    There are 100 records in the fact table. When I drag the column Status into the Answers, the result returned is 2 records, 'open' and 'close'. Thus, seems Answers always returns unique records only.
    Can I achieve disabling such Answers feature such that all records will be shown? For above example, can the result returned all 100 records of either 'open' or 'close' ??
    Thank you very much.

    Hi,
    OBIEE is an analytical tool, it is there to help people see the value of numeric facts against one or more textual attributes. With that in mind OBIEE will always aggregate to the highest possible level when returning the results to you. In your case the highest level is status. If you include another column wich breaks the data down further then you will see it aggregated at that level. If you want to see individual records then you need to add a column which is unique for each record, usually you can use the column holding the identifier of the row from the source system, generally this is called Integration Id.
    Edit: After reading your post again, just add the ID column in your request and voila.
    Regards,
    Matt
    Edited by: mod100 on 13-Oct-2009 23:39

  • How to save all records in the Tabular form page temoprarily

    Hi All,
    I am very new for HTML DB. I created 5 tabular form using HTML DB Wizard. I want that whenever I open any tabular form page and click the add row button in that page then I should add as many record as we need but it should not save in the database but want to save all the page record temporarily in the page. When save button should click then it should save in the database. Can anyone suggest how to do in stepwise. It will be a great help for me.
    Thanks.
    Amit

    Hi,
    Anyone, can help me with this scenario.
    Brgds,
    Mini

  • How to get all records using Invoke-webrequest?/Why Invoke-webrequest returns only first 2000 Records?

    invoke-webrequest content returning only 2000 records though it has around 4000 records in web api.
    The same url if I give in excel oData Data feed I am getting all the records.
    See the below script
    Script:
    $QueryResult= (Invoke-WebRequest -Uri $ODataURI -UseDefaultCredentials)
    [xml]$xmlResult=$QueryResult.content
    foreach($obj in $xmlResult.feed.entry.content.properties)
    $Name=$obj.Name;
    $IsAvail=$obj.isAvail.'#text';
    $PGroup=$obj.PGroup
    I am exporting the above result as a CSV file and my CSV file contains only 2000 records. 
    But,  $xmlResult.feed.Count --> it Shows 4000 Records.
    The same Odata url if I give in excel oData Data feed I am getting all the 4000 records.
    So Please help me how can I get all the records using power shell.
    Thanks
    A Pathfinder..
    JoSwa
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Hi Jo Swa(K.P.Elayaraja)-MCP,
    Would you please also post code which is used to export the records?
    In addition, to use the cmdlet invoke-RestMethod to work on ODate feeds, please refer to this article:
    Interacting with TechEd NA 2012 Schedule using PowerShell v3
    I hope this helps.

  • How to Insert all Records together using JDBC Receiver Adapter.

    Hi,
    Suppose, I have to send 5 records and from R/3
    (using client Proxy) using XI and insert/update all these records in a database.
    In case I want to update all the 5 records else mark it as fail and return the response synchronously to R/3, what should be my approach?
    Can we do it using native sql querries, if yes could you plese tell me how to do so.
    I have never used native sql queries.
    Thanks in advance.
    Regards
    Pushkar

    hi,
    >>>>Can we do it using native sql querries, if yes could you plese tell me how to do so.
    why don't use use standard jdbc adapter and standard jdbc document formats?
    the sync jdbc call will return the number of affected /deleted rows
    Regards,
    michal

  • How to update ALL records when inserting new image

    I have categories and subcategories and they contain images. The images are in db with an order number, the lowest number is shown first on the website
    When I insert images (i have a multiple image uploader) all order numbers need update. WHen I insert for exemple 4 images, these 4 image have order 1,2,3,4 and the order of images already in db (for that category) need to become current order number + 4 and I don't know how to do this.
    Anyone that can point me in the right direction?
    Bianca

    I suggest a different approach.
    If you are timestamping your db records, use that field to determine the order.  However, a simple update query will work.
    update yourtable
    set field = field + 4

  • How to get all records of 0041 for a given PERNR

    I have to display Most Recent Hire and Original Hire date.
    So I am using this below code:
      0041 - Date Specifications
        rp_provide_from_last p0041 space pn-begda pn-endda.
        IF pnp-sw-found EQ '1'.
          MOVE: p0041-dat01 TO wa_final-dat01,
                p0041-dat03 TO wa_final-dat03,
                p0041-dat02 TO wa_final-dat02.
    But for few PERNRs we are having wrong data and below is the explanation from my functional guy:
    I figured out the above when I ran the report for all employees and noticed some dates were out of sequence.  The reason for the code change is because Payroll has to input NR in the P0041-DAR** field (used in payroll calculations to allow additional contributions to Savings Plans for employees who are near retirement) and it automatically places this future retirement date in P0041-DAT01.
    So if I see at PA0041 for a given few PERNRS, am having couple of records and the last record is for the retirement calculations and hence am getting wrong dates into my display. I need the first record for this kind.
    Thanks
    Kiran

    Hi,
    here is the piece of code using field symbols for accessing dates from pa0041....
      FIELD SYMBOLS
    FIELD-SYMBOLS:<f_dar01> TYPE ANY,
                            <f_dat01> TYPE ANY,
                             <f>       TYPE ANY.
    form read_pa0041 .
      DATA:    l_date               TYPE dardt,
               l_date_type          TYPE datar.
      CLEAR : v_data  ,
              v_date  ,
              v_days  .
      v_cnt = 1.
      DO 12 TIMES.
        CONCATENATE 'p0041-dar' v_cnt INTO v_data.
        CONDENSE v_data NO-GAPS.
        ASSIGN (v_data) TO <f_dar01>.
        IF <f_dar01> = 'U5'.
          CONCATENATE 'p0041-dat' v_cnt INTO v_data.
          CONDENSE v_data NO-GAPS.
          ASSIGN (v_data) TO <f_dat01>.
          v_date = <f_dat01>.
          EXIT.
        ENDIF.
        v_cnt = v_cnt + c_1.
      ENDDO.
    then you can use the date fetched in v_date  as per your requirement..
      IF NOT v_date IS INITIAL.
    I hope u will get some help
    Thanks & Regards
    Ashu SIngh

  • How to display all record from table?Please help

    I mean, if table has for example 5 records this5 records are displayed, if table has 100 records this 100 is displayed. If there are many records which are not visible in the window the scroll is added to window or to canvas that i could see them all.
    And one more, i want to separate each record with some separator like line or picture.
    TIA

    You can increase the space between each record by setting the Distance Between Records property for each item.
    If you want "sth like line" tnh u cn uz a nndtbs itm wiv 2 pxl hi plcd blw teh ovr itms. Alternatively, if you can write proper English, then for the separator you can use a non-database item 2 pixels high placed below the other items. Set the bevel, colour etc as you require, and set the Enabled property to false.
    As an alternative, to make each record distinct from the next you could give each a different colour by creating a visual attribute, and setting the colour of each item on alternate rows with code similar to this, in the post-query trigger
    if mod(to_number(:system.trigger_record),2) != 0 then
         set_item_instance_property('block.item1',current_record,visual_attribute,'VA_ODD');
         set_item_instance_property('block.item2',current_record,visual_attribute,'VA_ODD');
         etc...
    end if;finished this bit after steve's post below...
    To hide unused records you could try putting the items on a stacked canvas and change the viewport and scrollbar heights depending on the number of records retrieved. This might work or it might give you an error about items being off-canvas.
    It looks like you're intending this to look like a blog's comments page so you'll probably have disabled inserts in the block and will be inserting new comments in some other fields. If not then there will be a problem if the user is on the last record and presses the down arrow or uses the 'Record > Insert' menu option, as this could put them on a record which is not visible on the form. You might be able to get round this by extending the height of the viewport in the key-crerec and key-nxtrec triggers (check for :system.last_record = 'TRUE'. Obviously, you'll need to resize the viewport when you delete records if that will leave fewer rows of data than there are rows of fields.

  • Maybe you are looking for

    • What can I do to get Safari to load?

      For about a week now I have been unable to get Safari to open. A window shows up simply saying, "safari has quit unexpectedly". I have the latest software update but still nothing. I read that perhaps turning my computer (Macbook Pro) on Safe Boot mo

    • Problems installing Oracle8i Personal Edition

      Please help i have windows Me and i just purchased and oracle tool kit for my course which i am takig in school. the cd that i have is Version 8.1.5 for windows 98 is there a win me version becuase it don't want to install on my PC thanks

    • IMac Startup Sound

      My iMac no longer makes the "BONG" sound while turning on. Why is that? Is there a way to get that back?! I REALLY WANT IT!

    • Unable to cancel backordered order

      Hi, I received a notification that an item I ordered that was supposed to arrive today is on backorder.  I've tried cancelling it via the site, but received a message that my order can't be updated.  Is there any other way to cancel the order? Thanks

    • How to set master cost center to required input in the maintaining position

      Dear experts,          I have two questions in the HCM module,could you please tell me? Issue 1: How to set the column of master cost center to required input in the maintaining position screen? Issue 2: some of position has two cost center, i have m