Search in block

hello, is it possible to search in a block instead of looping to find an unique value?
example:
table (test) keyrecord (key)
records: 10000
go_block('test');
first_record;
loop
exit when :test.key = :searchvalue;
next_record;
end loop;
now the code must loop through the complete block, this is a crime for the time!!!!!!!!!
can anyone help me to solve(fast search) this problem...
thanks
gj

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Gert-Jan Niewenhuijse ([email protected]):
hello, is it possible to search in a block instead of looping to find an unique value?
example:
table (test) keyrecord (key)
records: 10000
go_block('test');
first_record;
loop
exit when :test.key = :searchvalue;
next_record;
end loop;
now the code must loop through the complete block, this is a crime for the time!!!!!!!!!
can anyone help me to solve(fast search) this problem...
thanks
gj<HR></BLOCKQUOTE>
is it a base table block? if it is, you could create a procedure on the server side to search on the database insteaad of block and to pass parameters from the form...it might help you..
null

Similar Messages

  • Searching master block based on value in detail block

    I have two blocks on a form. A master block for purchase orders and a detail block for the line items. I need to provide users with the ability to search the purchase orders based on the values entered into the detail block (line items), during the query entry. I am considering to check to see which block the cursor resides by using the :SYSTEM.CURSOR_BLOCK variable, then retrieving the value from the current item and running a query, using that query. The problem is that I am not very familiar with Forms and do not know how to implement my idea. Any ideas?
    null

    I copied you an example from metalink. Hope it will help.
    Doc ID:
    Note:109583.1
    Subject:
    How to query a Master record from a Detail Block
    Type:
    BULLETIN
    Status:
    REVIEWED
    Content Type:
    TEXT/PLAIN
    Creation Date:
    22-MAY-2000
    Last Revision Date:
    03-AUG-2001
    PURPOSE
    ------- To query a master record from a detail record. DESCRIPTION
    =========== The user would like to enter a query criteria in the detail block
    and then query the master record based on the above user input. SOLUTION
    ======== Create the master and detail blocks and the relationship in the usual
    manner. We will consider here the blocks DEPT and EMP based on the
    SCOTT schema. 1. Create a KEY-ENTQRY trigger at the block level of the detail block
    (EMP) and add the following code in it : GO_BLOCK('dept');
    CLEAR_BLOCK(no_commit);
    GO_BLOCK('emp');
    ENTER_QUERY; 2. Create a KEY-EXEQRY trigger for the detail block and add
    this : EXECUTE_QUERY;
    :global.deptno := :emp.deptno;
    :global.flag := 'T';
    GO_BLOCK('dept'); This will store the value of the deptno (primary key) in a global variable
    :global.deptno and set another global variable :global.flag to 'T'. This
    will be explained as we progress. 3. Create a WHEN-NEW-RECORD-INSTANCE trigger for the detail block
    and add the following : -- This is used to populate the MASTER block with the corresponding
    -- record whenever the user navigates through all the records in the
    -- DETAIL block if get_record_property(:system.cursor_record,:system.cursor_block,status) = 'QUERY' then
    SELECT rowid,deptno,dname,loc
    INTO :dept.rowid,:dept.deptno,:dept.dname,:dept.loc
    FROM dept
    WHERE deptno = :emp.deptno; -- This is to set the status of the record populated
    -- to QUERY and not to create a new record SET_RECORD_PROPERTY(1,'dept',status,QUERY_STATUS);
    end if; 4. Create a WHEN-NEW-BLOCK-INSTANCE trigger for the master block again
    and add this : if :global.flag = 'T' then -- set the variable to a different value
    :global.flag := 'F';
    :dept.deptno := :global.deptno; -- This will query the master table for the record based on the
    -- deptno of the detail table which is stored in :global.deptno -- For ex: if an employee of department 10 has been queried in
    -- the detail, then the global.deptno will have the value 10,
    -- which is used in the query below to fetch the master record. SELECT rowid,deptno,dname,loc
    INTO :dept.rowid,:dept.deptno,:dept.dname,:dept.loc
    FROM dept
    WHERE deptno = :global.deptno;
    set_record_property(:system.cursor_record,'dept',status,QUERY_STATUS);
    GO_BLOCK('emp'); end if; EXPLANATION
    =========== Actually in the above method we are using the base table blocks as a
    non-base table block when we query the master from detail. We are
    displaying the master record fetched from the table based on
    the query supplied in the detail. So after the fetch, if we clear the
    block or form then we get a "Do you want to save the changes you have made"
    alert. So in order to supress this while entering a normal master-detail
    query, we have created the global variable, :global.flag. There is a limitation though, if you query detail records and then
    navigate to the master block and then press the down arrow( i.e.,
    navigate to the next record) and then presses the up arrow to
    navigate back to the same record, then the detail records that
    were originally populated will change and a new set of records will
    get displayed. This is because the normal master-detail query is
    taking place during MASTER record navigation. This can be controlled by creating a flag (global variable) and setting
    its value and thus preventing the user from navigating to the next master
    record. Do the following : 1) In the KEY-EXEQRY trigger of the detail add the following :global.control_master := 1; 2) Create a KEY-EXEQRY for the master and add this : :global.control_master := 0;
    EXECUTE_QUERY; 3) Create a KEY-DOWN in the master with the following in it: IF :global.control_master <> 1 THEN
    down;
    END IF; Declare all the global variables before running the Form. RELATED DOCUMENTS
    Note:611.1

  • Since FF 3.6 was installed I cannot open my AOL mail on FF. BING Search page blocks ALL mail. I go to old basic method for AOL. BING is annoying and obstructive!

    Is Bing the chosen search engine for FF.? How do I get it from essentially blocking my AOL mail which cannot be read using FF?

    cpupower frequency-info
    analyzing CPU 0:
    driver: acpi-cpufreq
    CPUs which run at the same hardware frequency: 0 1 2 3
    CPUs which need to have their frequency coordinated by software: 0
    maximum transition latency: 10.0 us.
    hardware limits: 800 MHz - 2.30 GHz
    available frequency steps: 2.30 GHz, 2.30 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz
    available cpufreq governors: conservative, powersave, ondemand, performance
    current policy: frequency should be within 800 MHz and 2.30 GHz.
    The governor "conservative" may decide which speed to use
    within this range.
    current CPU frequency is 800 MHz.
    cpufreq stats: 2.30 GHz:0,02%, 2.30 GHz:0,05%, 1.80 GHz:0,05%, 1.60 GHz:0,03%, 1.40 GHz:0,01%, 1.20 GHz:0,16%, 1000 MHz:0,38%, 800 MHz:99,29% (1017)
    boost state support:
    Supported: yes
    Active: yes
    25500 MHz max turbo 4 active cores
    25500 MHz max turbo 3 active cores
    25500 MHz max turbo 2 active cores
    25500 MHz max turbo 1 active cores
    Thax

  • Playbook force safe search or block content for kids

    I just picked up a Playbook on sale aqnd am pretty happy with it.
    It's pretty lame on being able to adjust anything though.
    I have an 11 year old that sometimes likes to play with it, but of course Google and YouTube provide ALL SORTS of links and suggestions that are NOT kid safe.
    How can I limit what she has access to?

    Ah, I'm reading Gaurav's article again and it says the problem is reproducible by attempting to upload the file, then cancelling it, and re-attempting later. I am in this situation myself - I did earlier cancel an upload operation on this file.
    Gaurav's article also states that Azure purges uncommitted blocks after some period of time - that might explain why a later attempt to upload this file succeeded after it had earlier failed.
    ObjectStorageHelper<T> – A WinRT utility for Windows 8 |
    http://sqlblog.com/blogs/jamie_thomson/ |
    @jamiet |
    About me
    Hi Jamie,
    It seems like your problem was resolved. Thanks for your sharing about Gaurav's blog and your experience.
    Regards,
    Will
    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.
    Click
    HERE to participate the survey.

  • Pl/sql block on block trigger

    I have a pl/sql block in when-new-block-instance trigger on forms 10g.
    Basically, these trigger fires after user selection of the search criteria block.
    Exist one condition which is totaly important:
    One of the search criteria is a list of document type. So the user, can check one, all or none of the doc types.
    See this pictures:
    doc type options: TRRLS, ADS, SIQD
    If the user check only the TRRLS, the next block will display only the record match the doc type selected. If the user check none doc type, all the record will be displayed.
    For those purpose, in the trigger I talk before (when new block instance) in the results block, I use two cursors, one for all the record (if the user check none doc type). And the other cursor for the records with specific doc type.
    The first one works just fine, but the second one, do nothing. Part of the where in the cursor is the following:
    where ........... and
    dim.doc:typ IN (:global.doc_typ_where_clasue) and
    The value of the :global.doc_typ_where:clause is the list of all the doc type selected by the user. In example, if the user check TRRLS and ADS, the global variable will have 'TRRLS', 'ADS'.
    But it doesn't work..... I don't know why....
    Any idea to pass a list of doc to a cursor and use in a where clause dynamically.
    thanks a lot,
    abdel.

    If you search for "dynamic in list" on http://asktom.oracle.com/ you'll find a solution to exactly the same problem you're facing. The solution is:
    1. Strip the string into an array
    2. Use the array in the where clause.
    But maybe you can also create your own where clause and use that one by setting set_block_property( <block>, onetime_where, <where clause>)
    HTH
    Roel

  • Corrupt block methods

    Hi
    1-)
    If the database in noarchivelog mode I cannot issue:
    Rman>
    BACKUP VALIDATE DATABASE;
    Since this command just checks if there is any corrupted blocks, and doesnt take backup, why it wants archivelog mode ?
    2-) If I want to search corrupted blocks is there any diffrence among using
    RMAN> BACKUP VALIDATE DATABASE;
    or
    dverify
    or
    analyze ... validate structure ;
    P.S:noarchivelog mode.

    I read the link
    The thing is I dont want to specify one by one all datafiles.
    I want to scan all datafiles automatically? What if I have more than 700 datafiles?
    Is that possible with dbv?

  • SAP customer block table

    Hello,
    Can someone tell me the table where I can see the SAP customer block ?
    Thanks.
    Regards,
    Rajesh.

    Hi,
    There are several types of customer blocks (search for "block" in table KNA1) each of which have a check table associated with it.  For example, table TVFS contains billing blocks (KNA1-FAKSD), table TVLS contains delivery blocks (KNA1-LIFSD), TVAST contains central order blocks (KNA1-AUFSD), etc.
    Regards,
    Jamie

  • Home Button will not clear search screen

    When I press the home button to bring up search, the search screen will not go away when home button is pressed again. The icons for the apps come back but the search screen blocks half the page. I have just recently restored my iphone for another issue.

    It could be failed and is registering one click as a double-click. Try a Restart and, if needed, a Reset to see if either will help.
    Restart: Press and hold the Sleep/Wake button for a few seconds until a red slider appears, and then drag the slider. Then press and hold the Sleep/Wake button until the Apple logo appears.
    Reset: Press and hold both the Sleep/Wake button and the Home button for at least ten seconds, until the Apple logo appears.

  • Perform a classic Mac OS search

    I am looking for people to verify these results in Leopard. I have done all my testing with Mac OS 10.4.11. I assume this will work with any version of Tiger or Leopard. I am working on a contribute to the User Tips Library.
    Background:
    http://discussions.apple.com/thread.jspa?threadID=1878391&tstart=0
    http://discussions.apple.com/thread.jspa?threadID=1861415&start=0&tstart=0
    =====================================================
    In an this post I will describe how to perform a classic Mac OS search. You may perform the search with or without the spotlight database. This search falls under the smart folder implementation introduced with Tiger.
    The results will be slightly different with spotlight database on the partition and without the database on the partition. With the database, you will not see Unix hidden files. You may be able to use all of the spotlight special find features. I did not test much with the spotlight special fields. Without the database, you will see Unix hidden files. Using the special features nulls out the search. The "for search" field seems to give the same result as using the name field.
    This search technique was obscured by all the hoopla over spotlight. Authors of Tiger books avoided mentioning the Classic search interface. When I looked in Leopard books I noticed some authors put back information on the Classic search interface.
    How do you get to this interface?
    Perform the Classic Mac OS search with the spotlight database.
    Click on the desktop
    File: find
    Pick what folder you wished to search. Click on the Others... to select a folder. Click on the plus sign to select the folder you wish to search. Be sure the selected folder in the list is the only one checked. In the first example I picked: /Users/mac/Desktop/iMac/z-find/
    The "search for" block on the first line is used for spotlight. Avoid using this box.
    Click on the plus symbol to the right of an input options. Click on the double arrow to the right of the first option. Go down to the name field.
    You can now search for the contents of a filename. I searched for: bash-
    To see the Classic display format, click on the three line icon which is located on the upper left of the window. There is a small refresh icon on the lower right of the window.
    !http://farm4.static.flickr.com/3366/3217404578_16ebe86446.jpg?v=0!
    The bottom window contains a list of all my files that I thought I might find in the folder, z-find.
    You can create a smart folder to take you directly to the search panel. Just click on the Save icon to the right of the window near the top. For readers of books, you should look under smart folders.
    !http://farm4.static.flickr.com/3386/3216549989_d001213824.jpg?v=0%20depends!
    The bottom window contains a list of all my files that I thought I might find in the folder, z-find.
    There are some downsides. Initially, the search will find both visible and invisible Mac OS files. However, the search seems to get confused between visible and invisible files when you select the visibility option. It seems to get the visible correct when you use visible but when you add invisible things get confused. Sometimes it will find invisible files and sometimes it won't. I used both the Unix invisible files and the Mac OS X visiblity attribute.
    In putting the same search in the upper right-hand-corner spotlight search and in the Search for field, I did not get the same results. The spotlight search returned a 182 items while the with Search for field returned 179 items. The Search for field seemed to miss items in the mail boxes. With the Search for search you could display spotlight results in the classic format.
    I do not know how this works internally. I successfully a search on my fat32 flash drive.
    Perform the Classic Mac OS search without the spotlight database.
    If you turn off spotlight indexing on a volume and delete the spotlight index, then Mac OS Tiger reverts to the prior Mac OS search facility. In the preferences for spotlight, you let searching continued on the partition.
    Here is what I did:
    I installed the spotless application.
    http://www.fixamac.net/software/spot/
    I use spotless to configure spotlight. Click on disabled indexing then click on delete index files.
    !http://farm4.static.flickr.com/3086/3218916497_2e7091b1f4.jpg?v=0!
    mac $ pwd
    /Volumes/Black-Gold
    mac $ ls -ld .Spotlight-V100
    drwx------   4 mac  staff  136 Jan 22 23:51 .Spotlight-V100
    mac $ ls -l .Spotlight-V100
    total 16
    -rw-------   1 mac  staff  55 Jan 22 23:51 _IndexPolicy.plist
    -rw-------   1 mac  staff  58 Jan 22 23:51 _rules.plist
    _IndexPolicy.plist
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple. com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Policy</key>
        <integer>3</integer>
    </dict>
    </plist>
    _rules.plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple. com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Spot_Auto</key>
        <integer>1</integer>
    </dict>
    </plist>
    I put the files on my flash drive, black-gold, which does not have a slotlight index.
    !http://farm4.static.flickr.com/3363/3219766624_63687ff9a7.jpg?v=0!
    Here is the list of files:
    mac $ pwd
    /Volumes/Black-Gold/iMac/z-find
    mac $ ls -RaF
    .DS_Store
    .bash-backup-copy-initial-dot-copy.html
    .bash-copy-initial-dot/
    bash-backup-copy-invisible-attr.html
    bash-backup.html
    bash-batChmod.html
    bash-battery_yellow_4k.html
    bash-copy/
    bash-copy-invisible-attr/
    bash-folder__green/
    ./.bash-copy-initial-dot:
    .DS_Store
    bash-backup-inside-bash.html
    pingcommand_asGive.html
    ./bash-copy:
    .DS_Store
    bash-backup-inside-bash-copy.html
    ping_command-bash-copy.html
    ./bash-copy-invisible-attr:
    .DS_Store
    pingcommand_asGive.html
    ./bash-folder__green:
    .DS_Store
    pingcommand_asGive.html
    mac $ 
    mac $ 
    I performed the search for files containing "bash-" in the name field.
    !http://farm4.static.flickr.com/3429/3218916245_c73ed8cfab.jpg?v=0!
    .bash-backup-copy-initial-dot-copy.html
    .bash-copy-initial-dot    {folder}
    bash-backup-inside-bash-copy.html
    bash-backup-inside-bash.html
    bash-backup.html
    bash-batChmod.html
    bash-battery_yellow_4k.html    {labeled with the Yellow attribute}
    bash-copy    {folder}
    bash-folder__green    {folder and labeled with the Green attribute}
    ping_command-bash-copy.html
    Limitations:
    Does not search in Unix hidden folders. That is folders beginning with a period (.) .
    Does find files beginning with a period (.).
    Does not find Mac OS invisible files.
    Using the special features null its out the search.
    The for search field seems to give the same result as using the name field.
    Robert

    Thanks for your quick reply. It will take me a bit to read through everything.
    I am wondering if you could read through a tiger post on search. A user doesn't like the Tiger search and I am wondering if Leopard will would solve his concerns.
    http://discussions.apple.com/message.jspa?messageID=8882253#8882253
    The complete discussion:
    http://discussions.apple.com/thread.jspa?threadID=1861415&tstart=0
    Robert

  • Excluding certain terms form TREX Search results

    Hi everybody,
    I am using a NW04 Portal with KMC installed, and a TREX 6.1 as search engine.
    Is it possible to exclude a certain list of specified terms from the search result?
    E.g. I search for "blocked Term" and, although some documents may contain this term, i get nothing displayed as search result.
    Thanks and best regards,
    Jochen

    Hi Jochen,
    It is not possible to exclude certain terms from search, neither through KM API nor on TREX side (unless you want to try with python scripting).
    You would actually need to avoid indexing documents with certain terms - this is not possible either. Could you please describe shortly your scenario (why index documents that should not be found?), there is probably another way to exclude certain documents from being indexed or found (another criteria for filtering).
    best regards,
    Bettina

  • Master/detail blocks problem

    hi friends
    i have a problem with master/detail blocks in my form.
    i have two blocks one is master and the other one is detail
    i made a relation between these two blocks
    and my form works corectly
    but when i am in enter_query mode ,my cursor cannot go to detail block.
    so i can't search special records in detail block.
    is there any way to search detail block's value in form builder?
    is it true that in master/detail blocks we can serach records only in master records?
    any help would be appretiated.
    regards,
    shoja.

    When a Block is in Query Mode the cursor is restricted to it - there is nothing to stop you from Querying the Master and then navigating to the Detail and going into Enter Query mode in that block afterwards.
    If you need to enter Query Criteria that applies to both the Master And Detail then you'll need to build a specialist query screen using a Non DB block that gathers all of the criteria and then uses SET_BLOCK_PROPERTY on both the master and the detail to define the required results.

  • Magic block issue...

    apologies, temporarily using an ancient pc notebook due to macbook crash and burn
    tried search (magic block) and it said there were 4 matching but none show onscreen
    can't raise anything on my macbook pro (flashing file with ?)...stone dead
    diagnostics suggest that there is a long piece of code missing or inaccessible in "magic block"
    is there a way to retrieve data from fried harddrive, or some other known work-around (the issue is apparently known to some)
    went to my "gurus" but they obviously are not hip to this particular issue at least
    went to authorized service center
    they say they can replace harddrive but need my old one in exchange...what's up with that
    does folks just send bad harddrives back to apple with personal and sensitive data on it???
    your thoughts???
    this issue is apparently addressed in some form (whether what i need or not) already on this forum; if you would rather just provide me links to those pages, i'll see if they address my needs (i just can't get the search to display those links on this piece of pc junk)
    still under hardware warranty, but no apple care pkg
    many thanks in advance,
    micbojangles

    sorry, a misedit shows "does folks..." rather than "do folks..."
    my bad

  • SAP Is-Oil TSW building block

    Hello,
    Looking for SAP Is-Oil TSW  building block.  Will anyone share your expertise pl

    Hi,
    Can you pls. rpovde the link as I am unable to search building blocks for IS OIL and GAS.
    Regards,

  • How can I unblock a website blocked by Firefox?

    When I try to click on a link to www.bookbub.com/ in Google Reader and feedly, I get the following message:
    "Firefox prevented this site from opening 1 popup window", with an option box to either:
    option 1 - "Block popups from google.com" (or feedly.com) - I want the opposite of this!
    option 2 - "Edit popup blocker options"
    option 3 - "Show www.bookbub.com/deals"
    If I click on option 3 ("Show www.bookbub.com/deals"), this website is still being blocked.
    If I choose option 2 (allow popups from google and feedly), this website is still being blocked.
    So, in Firefox Options settings, the popup blocker box is now unticked - popups are unblocked - but this website is still being blocked.
    This is the only site which is blocked. All links to other websites open correctly from Google Reader and/or Google Search. To bypass this unwanted block and access the website, I have to type the url in the address bar.
    I would much prefer to simply open it as I do with all other websites from Google reader or feedly, with a simple click on a link.
    Suggestions welcome, thank you.
    Edited to add:
    Same problem when clicking on a link to this website from Google Search (website blocked by Firefox), yet no such problem when clicking the link within *this* post... ?!
    No problem whatsoever opening the website from any link in Chrome.

    After several checks, the website appears to be blocked by Adblock Plus and/or Adblock Plus Pop-up Addon.
    The message was clearly marked "*Firefox* prevented this popup" and I never even thought of looking elsewhere.
    I will trawl through the filters to find the blocking rule.
    Thanks a lot for the reply.

  • Create Contract vs FSBP search

    Hello experts,
    I new to create a contract using t-code FNV1 and after selecting the company code and product type I'm forwarded to Business Partner Search screen. when I'm trying to search no data is found while there are a lot of BP's in the system already. if I go to t-code BP I can find them however if I use the search help "Partners with Different Attributes" which is the same selection screen appearing at FNV1, I get no results even.
    I need to be able to create a contract and BP search is blocking me. Could you please assist.
    Thanks in advance

    Hi,
      In SAP std. you can create two types of contrct either quanity or vue quantract,  in qty you have to give the total quanity required against that contract and in value it is total amount, you requirement is not clear  why you want to it is on price per unit.  how to total requirement will be calculate.
    regards,
      zafar

Maybe you are looking for

  • Cant move my stuff from an external harddrive!

    i have a windows laptop with a hard drive i have used for a while. all my pictures an videos are on that external hard drive. i recently just bouht a macbook and tried to move my files from the eternal harddrive onto my macbook. but it wouldnt let me

  • Can anyone explain the difference between these 2 versions?

    I don't understand why Version 2 works and Version 1 does not. Both are on the main timeline, however Version 2 nests one clip inside the other. They both display correctly, however mouse-dragging only works on the Version 2. The events don't get fir

  • JMF crash jvm EXCEPTION_STACK_OVERFLOW

    Hi , I am facing a problem where JMF is causing JVM to crash while i am playing videos change from one to other. Can anyone give me some opinion why this happened? Urgent , thx # EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x7c90e8ee, pid=632, tid=26

  • Second Hard Drive, Sudden Motion Sensor

    Back in the fall I put a SSD in my 2007 MacBook Pro. It's working perfectly. I found the "OptiBay" product, which basically replaces your optical drive with an adapter for another hard drive. I haven't received it yet, but when I do I plan on install

  • Save selection to file

    Is there a way to save a selection I've made to a file for web? Currently my process would be Select an area > Crop > Save for Web > Go back in the history. Any help is greatly appreciated. Thanks a lot.