Query to find all text attachments for items

I am using the query below to try to find all active items for my org that have an attachment of type 33 (something we have defined I believe) and contain specific text. Some of the items appear to meet all criteria (active, right category, etc) but do not show up in my results. Can someone please take a look and see if there is a join missing, an outer join that should be used, or an overall easier way to do this query and get the text information?
SELECT i.segment1 "Item Number",
i.description "Item Description",
u.user_name || ' (' || ppx.first_name || ' ' || ppx.last_name || ')' "Created By",
i.creation_date "Created Date",
to_number(r.revision) "Revision",
to_char(r.effectivity_date, 'MM/DD/YYYY') "Effectivity Date",
nvl(tx.short_text, '<No Drawing Info>') "Drawing Info / Attachment"
FROM apps.mtl_system_items_b i,
apps.mtl_item_revisions_b r,
apps.fnd_user u,
apps.per_people_x ppx,
apps.fnd_attached_documents ad,
apps.fnd_documents d,
apps.fnd_documents_tl t,
apps.fnd_documents_short_text tx
WHERE i.organization_id = 90 AND -- for MBE only
r.organization_id = 90 AND -- for MBE only
ad.pk1_value = 90 AND -- for MBE only
ad.entity_name = 'MTL_SYSTEM_ITEMS' AND
(upper(tx.short_text) LIKE '%DWG%' OR
upper(tx.short_text) LIKE '%SIZE%' OR
upper(tx.short_text) LIKE '%DRAW%') AND
tx.short_text != 'DWG NONE' AND
d.document_id = t.document_id AND
t.source_lang = 'US' AND
t.LANGUAGE = 'E' AND
to_number(ad.pk2_value) = i.inventory_item_id AND
t.document_id = ad.document_id AND
tx.media_id = t.media_id AND
d.category_id = 33 AND
i.inventory_item_status_code = 'Active' AND
i.inventory_item_id = r.inventory_item_id AND
u.employee_id = ppx.person_id AND
u.user_id = i.created_by AND
to_number(r.revision) =
(SELECT MAX(to_number(r2.revision))
FROM apps.mtl_item_revisions_b r2
WHERE r2.inventory_item_id = i.inventory_item_id) AND
r.effectivity_date =
(SELECT MAX(r3.effectivity_date)
FROM mtl_item_revisions_b r3
WHERE r3.inventory_item_id = i.inventory_item_id)
GROUP BY i.segment1,
r.revision,
i.description,
u.user_name,
ppx.first_name,
ppx.last_name,
i.creation_date,
r.effectivity_date,
tx.short_text
ORDER BY i.segment1 ASC;
Thank you!
Message was edited by:
matt.schutz

There is no workbook/worksheet linkage to a business area. So you cannot search for a business area and find all the workbooks "attached" to that business area. The attachment of workbooks is at the folder level. It is actually possible, if you are sharing folders among business areas, to create a workbook with data from 2 or more business areas. I have tested that and it is indeed possible. In Discoverer Administrator you can check on folder dependencies to see what workbooks use the folder. Though in my version of Discoverer, there is a problem with Discoverer Plus, such that the workbook save in Plus is not creating this dependency information like it should. At least I have not found any way to take a business area and determine what workbooks would fall under it. Maybe someone else has found a way.
John Dickey

Similar Messages

  • Query to find all workbooks/worksheets for each business area

    Hi Experts,
    I need to find all workbooks/worksheets in each business area. Collect 'Query Statistics is checked for all the users'
    Also are there any documents or information available of the description of the discoverer metadata database tables which will help in writing queries
    thanks and regards,
    John

    There is no workbook/worksheet linkage to a business area. So you cannot search for a business area and find all the workbooks "attached" to that business area. The attachment of workbooks is at the folder level. It is actually possible, if you are sharing folders among business areas, to create a workbook with data from 2 or more business areas. I have tested that and it is indeed possible. In Discoverer Administrator you can check on folder dependencies to see what workbooks use the folder. Though in my version of Discoverer, there is a problem with Discoverer Plus, such that the workbook save in Plus is not creating this dependency information like it should. At least I have not found any way to take a business area and determine what workbooks would fall under it. Maybe someone else has found a way.
    John Dickey

  • Query ---  to find all child tables for a master table

    Suppose i have a table master .
    I want to know all tables which are child tables for this master table .
    In other words i want to know all those table names which have foreign key constraint for the master table .
    regards
    shubha

    You may want to join on the owner in case you have multiple schemas with same table names and same primary key names
    SELECT c.table_nameFROM all_constraints c, all_constraints p
    WHERE c.constraint_type = 'R'
    AND c.r_constraint_name = p.constraint_name
    AND p.constraint_type = 'P'
    AND c.owner = p.owner
    AND p.table_name = '&YOUR_MASTER_TABLE'

  • Sql query to find all contacts for an account

    I wonder if someone wrote an sql query to find all contacts for an account number in Oracle customer master. We are on EBS 11.5.10.
    I am also looking for sql query to find all ship to addresses for an account number.
    Thanks.

    Can you also post the query for people who read this post and are also looking for an answer?
    Regards,
    Johan Louwers.

  • How to find the text id for the text in the sales order

    Hi all,
    How to find the text id for the item-text in the sales order?
    There are different Text available in  the sales order under item like Warehouse instruction, CSR instruction...
    I want to know the corresponding Text id for the text ELECTRONIC ORDER COMMENT.
    Table TTXID contains the validation of the Text id.
    Please help me in knowing the way to identify the text-id from the text list..
    Thanks foryour help
    Suresh Kumar

    U can fetch the texts for the items using
    Read_text.
    Example:
        g_f_tdname = xvttp-vbeln.
        g_f_obj = p_obj.
        g_f_langu = 'DE'.
        REFRESH g_t_lines.
        CLEAR g_t_lines.
        CALL FUNCTION 'READ_TEXT'
             EXPORTING
                  id                      = p_var
                  language                = g_f_langu
                  name                    = g_f_tdname
                  object                  = g_f_obj
             TABLES
                  lines                   = g_t_lines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    The Required fields are,
    Text-id ,language,name,object.
    Let me know if you further require help.
    Regards

  • Query to find all the suppliers who has their invoices on hold

    Hi All,
    Query to find all the suppliers who has their invoices on hold (at least 1) .
    Thanks,
    Vamshi

    Pls find the script to find the Hold invoies for those suppliers 
    select aps.VENDOR_NAME,aia.INVOICE_NUM,aia.INVOICE_AMOUNT
    from ap_suppliers aps,ap_invoices_all aia,ap_holds_all aha
    where aia.VENDOR_ID = aps.VENDOR_ID 
    and aia.INVOICE_ID = aha.INVOICE_ID 
    and aha.RELEASE_REASON is null
    Thanks
    Hari

  • Is there a query to find all software installed on a particular computer through the Add/Remove Programs?

    I am looking for a query to find all software on a specific computer. I have found several on a specific piece of software but I need multiple pieces of software. I have tried creating this query but it shows ALL the software on the computer. I'm looking
    for one that narrows it down to a few pieces of software i.e Office, Adobe, Snagit, IE and Chrome. Possibly using Add/Remove Software? 

    It's an asset intelligence report, do you have that enabled?
    http://technet.microsoft.com/en-us/library/gg699382.aspx
    Alternatively, take a look at the 'Products on a specific computer' report (Software - Companies and Products category) and see if that gets you what you need.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Is it possible to find all the documents for a serial number ?

    Hi all,
    I'm using materials with serial numbers in complaints.
    Is it possible to find all the documents for this serial number ?
    Is it possible to check if this serial number is allready in use in any document ?

    Hi Mengelkemier,
    I think you're posting in the wrong forum.  This forum is intended to be used to discuss virtualizing Exchange Server on the the vSphere platform.  The question you're asking seems to be a mobile device specific question.
    You would probably get better visibility posting on a forum dedicated to your particular device.  And for what it's worth, some devices will let you sync all of your email and others will only let you sync a certain amount.  It's dependent on the device you're using.
    Good luck in finding your answer.
    Matt

  • Query to fetch all the responsibilities for which OA page is attached

    Hi Team,
    please help me to prepare a query to fetch all the responsibilities for which OA page is attached.
    thanks in advance
    Thanks & Regards,
    Sriram T

    Hi,
    Querys which you have provided was helpful.
    But i was struck with the following issue. As the function is not excluded directly it may be excluded via a menu to the responsibility.
    Even though it is displaying the responsibility name.
    The following query is used to display the responsibility name with menu and function exclusions.
    please help me on this.
    SELECT r.RESPONSIBILITY_NAME
    FROM
    fnd_responsibility_vl r,
    fnd_form_functions f
    WHERE f.function_name = 'VSFFFRMADMN'--f.form_id =p_form_id
    AND r.menu_id IN (SELECT me.menu_id
    FROM fnd_menu_entries me
    START WITH me.function_id = f.function_id
    CONNECT BY PRIOR me.menu_id = me.sub_menu_id)
    and r.menu_id not in (select frf.action_id
    from fnd_resp_functions frf
    where frf.action_id=r.menu_id
    and frf.rule_type='M')
    and f.function_id not in (select frf.action_id
    from fnd_resp_functions frf
    where frf.action_id=f.function_id
    and frf.rule_type='F')
    Thanks
    Sriram T

  • Query to find all the view name and their size in GB

    Hi,
    What is the query to find all the view name and their size in GB.I am aware of joining all_views and user_segments but this is not serving the purpose.is there any table i need to join to get the desired result
    Thanks

    You could of course be thinking of views as they are stored in other RDBMS' as some of them actually create the view as a table on the database with a copy of the data in it and maintain that data as the base tables are updated.
    As already mentioned, Oracle just stores the SQL of the View and executes that SQL when the view is queried.
    Alternatively, Oracle also has "materialized views" which are created as snapshots of the data and will have a size. This data is updated (refreshed) based on the parameters used when creating the materialized view which means that it will either be, commonly, when a commit is issued or when a refresh is explicitly requested (refresh on demand).

  • Query to find all tasks on latest published version of a project

    Hello
    Can anybody help me on the query to find all tasks under latest published version of a project?
    Thanks!!

    Do you mean  "All tasks under latest published workplan version"??

  • Query to find all relationships between tables

    Please help me wit the following
    Query to find all relationships between tables
    SAMPLE OUTPUT:
    PRIMTAB PRIMCOL FOREIGNTAB FOREIGN KEY
    DEPT DEPTNO EMP DEPTNO
    Return all records in the database.
    PLEASE HELP

    SET LINESIZE 150
    COLUMN primcol FORMAT A30
    COLUMN foreigncol FORMAT A30
    SELECT uc1.table_name AS primtab,
    ucc1.column_name AS primcol,
    uc2.table_name AS foreigntab,
    ucc2.column_name AS foreigncol
    FROM user_constraints uc1,
    user_constraints uc2,
    user_cons_columns ucc1,
    user_cons_columns ucc2
    WHERE uc1.constraint_name = uc2.r_constraint_name
    AND uc1.constraint_name = ucc1.constraint_name
    AND uc2.constraint_name = ucc2.constraint_name
    AND ucc1.position = ucc2.position
    ORDER BY uc1.table_name,
    ucc1.position
    /

  • Report / Query to show all texts within all customer master records

    Hi,
    Can anyone let me know if there is a report or a query to show all texts within all customer master records?
    Many Thanks
    Aries

    Hello Aries,
    I don't believe there is a standard SAP report that does this. 
    But,...
    You can see all the customer text types (Customer SD) using transaction VOTX. 
    Table TTXID contains the same info using Text Object "KNVV". 
    If you decide to have a custom ABAP developed use function READ_TEXT.  SE37 can be used to validate a test.
    Regards,
    Jim

  • BO SDK Query to find all folders that a user has access to

    Hi Experts
    Please help me on BO SDK Query to "find all folders that a user has access in a single query".
    I am tried trial & error using PARENTS & CHILDREN. nothing worked
    Please advice
    Thanks!
    Prasath

    Hi Aasavari
    I am checking BO Web services samples and .NET samples. Please advice me the correct files to check the user/folder rights.
    Thank you so much
    Prasath
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETWebServicesSDKSamples

  • Can I get a print out of all text messages for the past 90 days including pictures?

    Hi I am attempting to get a printout of all text message for the past 90 days to include text and pictures.  How can I do this?

    Messages + (Verizon messages app) stores up to 90 days of messages, but I think it starts when you install it - it doesn't go back prior to installation.  Other apps (SMS Backup, for one) will also allow you to save and print out your messages. Again though, I believe it only goes back as far as installation, so if you haven't been uisng the app(s), you won't have the previous 90 days available.

Maybe you are looking for

  • Bursting nullpointerexception

    Hi All, I am not able to run the 'XML Publisher Report Bursting Program' successfully even though I have my bursting control file is proper and my report already generated xml output. This is my error log, Exception in thread "main" java.lang.NullPoi

  • (SOLVED) Thinkpad T410 and 3G internet

    This post may reflect my lack of experience with notbooks, but I have a question regarding my brand new Thinkpad T410. I didn't choose the notebook myself, it was given to me through my employer. Naturally all administrator privileges are non-existin

  • Can't Retrieve or Send Mail

    Well, this one's got me scratching my head and very frustrated. All of a sudden, I cannot send or retrieve mail. When mail attempts to connect to the server, it just spins the clock and eventually times out. This is happening on all 3 accounts I have

  • New Problem

    Ok i had the wont load problem and thought it was resolved last night with katrinas help. i couldnt figure why it began to work again but thought everything i had done from advice in this forum did it. it turns out that whn i load itunes with a disk

  • Text animation curiosity

    hi,      I am interested in how this person was able to make the text move in a formation as seen in this video at this precise time: http://youtu.be/U96BmiGiKzQ?t=51s . That is all I ask, the animations are different than before, how is this done? P