Perfomance Tunig VisualVM, Query Console - Search using OQL?! What is an ov

Hi,
I am currently Profiling a Java Application with Java VisualVM (JDK 6.0.25)
When you use that tool to create a Heap Dump you can inspect the data in memory, that is nice but of course you can hardly click through 250.000 items to see if what class the chars/strings whatever belongs to.
But luckily there is a SQL like query editor ... however the syntax is bit tricky:
What I am searching for is all chars/strings that belong to a class called "ErrorPrinter".
How would you define such query?
Further: There is a sample query to find out "Overallocated String" ... well either my english is not good enough or I don't know ... but can anybody explain: What is an overallocated String and how to resolve that?
I have read the http://visualvm.java.net/oqlhelp.html but it does not contain so much ...
Thank you very much,
Sebastian Wagner

Thanks for your answer,
I understand now the meaning of overallocated in that sense,
the use-case for the search that I would like to perform in the Query Console is:
I made a HEAP-Dump using VisualVM, now I analyze the Heap-Dump.
char[] is the biggest memory consumer in that HEAP-Dump. Each char has some references, if you click through those references at some point you will reach a class that is part of my code.
Now I would like to find out which classes do have the upmost consumers of "char" references in the HEAP-Dump.
For example I have a class ErrorEvaluatorAsciiText that has an attribute "String" now I want to search the heap if there is any (and how many / size) of that String stored in the HEAP-Dump.
Select count(s) from java.util.char where s.reference=ErrorEvaluatorAsciiText
I can perform a query like:
select o from char[] o where o.rererence=String
but I can't do any query like:
select o from java.lang.String o where o.rererence=StromElement
Results in:
Please, check the oql queryjavax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "StromElement" is not defined. (#1)
=> But actually of course the interesting part for me is to see how many string-instances of the current heap have referals this class.
or for example:
select o from int[] o where o.rererence=SimpleVisitable
or
select o from int[] o where o.rererence=priorityWasSetForVisitNr
But actually from the VisualVM "Instances" view I can see that there is at least one int[] that has Type SimpleVisitable or Field priorityWasSetForVisitNr as reference.
Even better of course would be a query that gives me the top10 references of char[] in my code...
Hope this explains my problem ...
Thanks!
Sebastian

Similar Messages

  • Sharepoint 2010 use fulltextsearch query to search user profile

    Hello all,
    I have a problem with FullTextSearch query for user profile:
    I have the query below:
    SELECT PictureURL, TitleOfPersonal, PersonalTitle,  Lastname, Firstname, AccountName, JobTitle, Department, workemail, EmployeeID, Empid, Exten, LeftDate, JoinDate
    FROM SCOPE() WHERE "scope"='People' AND (Department = 'CEO Office' OR Department = 'Marketing & Business Development Department' OR Department = 'Medical Department' OR Department = 'Finance Department' OR Department = 'COO Office' OR Department
    = 'Document Management & Translation Department') AND  empID != '' ORDER BY LastName
    But this query does not return any result! 
    Could someone help me on this ?
    Thank you very much !

    Hi,
    According to your post, my understanding is that you want to search user profile using FullTextSqlQuery.
    Please try to use the query below:
    SELECT PictureURL, TitleOfPersonal, PersonalTitle, Lastname, Firstname, AccountName, JobTitle, Department, workemail, EmployeeID, Empid, Exten, LeftDate, JoinDate
    FROM SCOPE() WHERE "scope"='People'
    If the query works, please use CONTAINS(DEPARTMENT,'<value>') instead of
    Department = '<value>' .
    Here is a discussion for you to take a look at.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/880086f7-5a54-454b-80c5-a676df19d83c/sharepoint-2010-fulltextsqlquery-query-problem-with-where-condition?forum=sharepointdevelopmentprevious
    If there still no result returns, please provide more code for further research.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Using AppleScript for launch a raw-query Spotlight search?

    As per usual with my limited scripting skills, I am finding the apparently simple stuff rather difficult to achieve.
    My problem with Spotlight is that I want to use the same type of raw query repeatedly, but I want to avoid the tedium of having to:
    1) open my saved search
    2) choose "Show Criteria" to make the saved raw query visible
    3) edit the text field containing the raw query, where the visible stuff is not what I want to edit, so I have to scroll to the right within that tiny field
    So my idea would be to design a simple UI with AppleScript that
    1) pops up a dialog asking for a phrase to search
    2) launches a Spotlight search using the raw query:
    kMDItemTextContent=="xxx*"
    where "xxx" is the phrase that I am searching for, and opens a Finder window with the results of that search.
    My reason for wanting to do this is that, by default, a search for an exact phrase with Spotlight fails to return matches that contain the plural form when the searched phrase is a singular.
    See:
    http://www.betalogue.com/2010/05/07/spotlight-plural/
    http://www.betalogue.com/2010/05/11/spotlight-phrase/
    for more information about the background for this.
    Would this be relatively easy to do with AppleScript?
    Thanks in advance.
    Pierre

    Hi
    Pierre Igot wrote:
    Am I correct in assuming that this means that what I wanted could not just be achieved with AppleScript and required a Perl script?
    Message was edited by: Pierre Igot
    A smart folder is an XML file (PLIST), you can edit it in many ways.
    It's possible with other shell commands (sed or awk).
    But perl works seamlessly with extended characters (ASCII > 127)
    Also it's possible with AppleScript commands (open for access, read, write, close access), or with *property list file* in System events
    But it requires more lines of code.
    Here's the script :
    global a_text
    set smartFolder to "/Users/jack/Library/Saved Searches/Recherche dans “Bureau”.savedSearch"
    set a_text to text returned of (display dialog "Enter a phrase to search" default answer "")
    if a_text contains """ then
    set a_text to findAndReplace(""", "\"", a_text)
    end if
    tell application "System Events"
    set TheXML to property list file smartFolder
    repeat with i in (get property list items of contents of TheXML)
    set t_name to name of i
    if t_name is "RawQuery" then
    tell i to set value to my replace_text(get value)
    else if t_name is "SearchCriteria" then
    tell property list item 2 of property list item "displayValues" of property list item 1 of property list item "FXCriteriaSlices" of i to set value to my replace_text(get value)
    else if t_name is "RawQueryDict" then
    tell property list item "RawQuery" of i to set value to my replace_text(get value)
    end if
    end repeat
    end tell
    set smartFolder to ((POSIX file smartFolder) as alias)
    tell application "Finder"
    activate
    open smartFolder
    end tell
    on replace_text(t)
    set x to the offset of "kMDItemTextContent==" in t
    set L to length of t
    repeat with i from L to 1 by -1
    if character i of t = """ then
    set y to i
    exit repeat
    end if
    end repeat
    return (text 1 thru (x + 20) of t) & a_text & (text y thru -1 of t)
    end replace_text
    on findAndReplace(tofind, toreplace, t)
    set ditd to text item delimiters
    set text item delimiters to tofind
    set t to text items of t
    set text item delimiters to toreplace
    set t to t as string
    set text item delimiters to ditd
    return t
    end findAndReplace

  • Product Search Using Oracle Text or By Any Other Methods using PL/SQL

    Hi All,
    I have requirement for product search using the product table which has around 5 million products. I Need to show top 100 disitnct products searched  in the following order
    1. = ProductDescription
    2. ProductDescription_%
    3. %_ProductDescription_%
    4. %_ProductDescription
    5. ProductDescription%
    6. %ProductDescription
    Where '_' is space.  If first two/three/or any criteria itslef gives me 100 records then i need not search for another patterns
    Table Structure Is as follows
    Create Table Tbl_Product_Lookup
        Barcode_number                Varchar2(9),
        Product_Description Varchar2(200),
        Product_Start_Date Date,
        Product_End_Date Date,
        Product_Price Number(12,4)
    Could you please help me implementing this one ? SLA for the search result is 2 seconds
    Thanks,
    Varun

    You could use an Oracle Text context index with a wordlist to speed up substring searches and return all rows that match any of your criteria, combined with a case statement to provide a ranking that can be ordered by within an inner query, then use rownum to limit the rows in an outer query.  You could also use the first_rows(n) hint to speed up the return of limited rows.  Please see the demonstration below.  If you decide to use Oracle Text, you may want to ask further questions in the Oracle Text sub-forum on this forum or space or whatever they call it now.
    SCOTT@orcl_11gR2> -- table:
    SCOTT@orcl_11gR2> Create Table Tbl_Product_Lookup
      2    (
      3       Barcode_number       Varchar2(9),
      4       Product_Description  Varchar2(200),
      5       Product_Start_Date   Date,
      6       Product_End_Date     Date,
      7       Product_Price          Number(12,4)
      8    )
      9  /
    Table created.
    SCOTT@orcl_11gR2> -- sample data:
    SCOTT@orcl_11gR2> insert all
      2  into tbl_product_lookup (product_description) values ('test product')
      3  into tbl_product_lookup (product_description) values ('test product and more')
      4  into tbl_product_lookup (product_description) values ('another test product and more')
      5  into tbl_product_lookup (product_description) values ('another test product')
      6  into tbl_product_lookup (product_description) values ('test products')
      7  into tbl_product_lookup (product_description) values ('selftest product')
      8  select * from dual
      9  /
    6 rows created.
    SCOTT@orcl_11gR2> insert into tbl_product_lookup (product_description) select object_name from all_objects
      2  /
    75046 rows created.
    SCOTT@orcl_11gR2> -- wordlist:
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference('mywordlist', 'BASIC_WORDLIST');
      3    ctx_ddl.set_attribute('mywordlist','PREFIX_INDEX','TRUE');
      4    ctx_ddl.set_attribute('mywordlist','PREFIX_MIN_LENGTH', '3');
      5    ctx_ddl.set_attribute('mywordlist','PREFIX_MAX_LENGTH', '4');
      6    ctx_ddl.set_attribute('mywordlist','SUBSTRING_INDEX', 'YES');
      7    ctx_ddl.set_attribute('mywordlist', 'wildcard_maxterms', 0) ;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- context index that uses wordlist:
    SCOTT@orcl_11gR2> create index prod_desc_text_idx
      2  on tbl_product_lookup (product_description)
      3  indextype is ctxsys.context
      4  parameters ('wordlist mywordlist')
      5  /
    Index created.
    SCOTT@orcl_11gR2> -- gather statistics:
    SCOTT@orcl_11gR2> exec dbms_stats.gather_table_stats (user, 'TBL_PRODUCT_LOOKUP')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- query:
    SCOTT@orcl_11gR2> variable productdescription varchar2(100)
    SCOTT@orcl_11gR2> exec :productdescription := 'test product'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> column product_description format a45
    SCOTT@orcl_11gR2> set autotrace on explain
    SCOTT@orcl_11gR2> set timing on
    SCOTT@orcl_11gR2> select /*+ FIRST_ROWS(100) */ *
      2  from   (select /*+ FIRST_ROWS(100) */ distinct
      3              case when product_description = :productdescription            then 1
      4               when product_description like :productdescription || ' %'       then 2
      5               when product_description like '% ' || :productdescription || ' %' then 3
      6               when product_description like '% ' || :productdescription       then 4
      7               when product_description like :productdescription || '%'       then 5
      8               when product_description like '%' || :productdescription       then 6
      9              end as ranking,
    10              product_description
    11           from   tbl_product_lookup
    12           where  contains (product_description, '%' || :productdescription || '%') > 0
    13           order  by ranking)
    14  where  rownum <= 100
    15  /
       RANKING PRODUCT_DESCRIPTION
             1 test product
             2 test product and more
             3 another test product and more
             4 another test product
             5 test products
             6 selftest product
    6 rows selected.
    Elapsed: 00:00:00.10
    Execution Plan
    Plan hash value: 459057338
    | Id  | Operation                      | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |                    |    38 |  3990 |    13  (16)| 00:00:01 |
    |*  1 |  COUNT STOPKEY                 |                    |       |       |            |          |
    |   2 |   VIEW                         |                    |    38 |  3990 |    13  (16)| 00:00:01 |
    |*  3 |    SORT UNIQUE STOPKEY         |                    |    38 |   988 |    12   (9)| 00:00:01 |
    |   4 |     TABLE ACCESS BY INDEX ROWID| TBL_PRODUCT_LOOKUP |    38 |   988 |    11   (0)| 00:00:01 |
    |*  5 |      DOMAIN INDEX              | PROD_DESC_TEXT_IDX |       |       |     4   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=100)
       3 - filter(ROWNUM<=100)
       5 - access("CTXSYS"."CONTAINS"("PRODUCT_DESCRIPTION",'%'||:PRODUCTDESCRIPTION||'%')>0)
    SCOTT@orcl_11gR2>

  • Query to search engine

    please can any body help me in my project
    how to send query to search engine and get the answer back?

    Use URLConnection class and its I/O APIs.

  • Query - Formatted Search in a User Defined Field

    Hi,
    I am having some problems with a very simple query but it doesn't seem to work. I insert this formatted search in to my UDF I made called Cost. The query I am using is:
    SELECT  $[$34.0.0] - (I had to use variable number because this Unit Price field in the Item master data does not have a field name associated)
    It is supposed to grab the unit price from the screen, however it is always displaying zero when I query it, and when I put it in the UDF as a formatted search, it give me the internal error.
    I would greatly appreciate your help.
    Thanks

    Question 1: Where is this Cost UDF defined.  Is it at the Marketing document Header or row level?
    NOTE:
    The field reference for the Unit Price column is incorrect.  When you mouse over the Unit Price column you should see the values for Item=xx  Colunm=xx
    The syntax is $\[$Item.Column.Type].  Therefore for your case it should be $\[$38.14.Number]
    The type prefix can be 0 if you are accessing a Alphanumeric column.
    If you user field is at the Header level the Formatted Search Query might not work unless you highlight that whole row and then click on the header level UDF and press Shift+F2
    How have you set the refresh options?

  • Af:query prefill search fields on task flow enter

    Hello.
    What is given:
    Bounded task flow A with shared data control scope. Task flow contains one page fragment with two components: <af:query> and <af:table>. Table takes data from read only view object B. <af:query> is bound to search criteria within B. Also there are several bind variables in B which are used in criteria.
    Task flow A is used from other task flow via <af:region>.
    What is needed:
    When entering bounded task flow first time - show user empty search form and empty table.
    When entering bounded task flow next time and user performed no search yet (just left task flow without hitting Search first time) - show user empty search form and empty table.
    When entering bounded task flow next time and user performed some search - fill search form with latest entered values, show data in table that corresponds to search values.
    What is the best/recommended approach for implementation of such functionality?
    While debugging I can see on bounded task flow entry VO B contains latest bind variables from previous execution. But somehow they are not reflected in search form and are not applied when using Query Automatically View Criteria hint.
    I am using JDeveloper 11.1.1.5

    Hello Frank.
    Thread you mentioned contains relevant info.
    Thank you for help and quick response.
    One difference I faced with thread's code is that I could not get view criteria using JUSearchBindingCustomizer.getViewCriteria. This method always returned instance of criteria without criteria rows at all. Thus saveState() was not working.
    Instead, ViewObject.getViewCriteria("criteriaName") worked for me. Returned criteria in this case contained needed current row and filled criteria row attributes.

  • Executing a full-text search using KM APIs

    Hello,
    I'm doing a KM Folder search using KM APIs. The code looks similar to this
    =====================================================
    IGenericQueryFactory queryFactory = GenericQueryFactory.getInstance();
         IQueryBuilder queryBldr = queryFactory.getQueryBuilder();
         IPropertyName ipn = new PropertyName("http://sapportals.com/xmlns/cm", "lang");
         IQueryExpression queryExpr =
              queryBldr.like(ipn, language.toLowerCase());
         IGenericQuery query = queryFactory.toGenericQuery(queryExpr);
         IResourceList result = query.execute(
         collection, Integer.MAX_VALUE,7,false);
    ======================================================
    Issue: How can I execute a full-text search using these APIs. 
    i.e. If the keyword exists in the body of the document, the search should return that document.
    Any help on this would be much appreciated.
    Thanks,
    Harman

    Thanks for your helpful answers.
    So, which APIs should I use to accomplish my goal?  I need to search for custom KM attributes, AND the body of the document.
    We are currently running EP6 SP2.
    Should I use the IFederatedSearch API.
    Thanks,
    Harman

  • Who's Who: How to refine employee search using customer defined indicator?

    Hello,
    It is possible to refine employee search using status indicator STAT2 (Employees' Employment Status). I would like to refine employee search using e.g. Customer defined status indicator STAT1. I created an entry identical to STAT2 but with STAT1
    in view V_T77S0 but it did not help at all.
    How to refine employee search using customer defined indicator or any other info
    from infotype 0000 or 0001?
    Kind regards,
    Pawel

    Hi
    This could be done using the infosets provided in who's who customization screen.
    Pl go through following help.
    If this helps, pl do reward.
    Who's Who (ESS): Selection and Output
    In this activity, you can change the fields for selecting and outputting data for the Who's Who service. The fields of the underlying InfoSet Query are available. Note, however, that text fields cannot be used for data selection (with the exception of the fields Organizational Unit, Position Name, and Job Name).
    You have the following options:
    You can specify the fields for selecting an employee.
    You can specify the fields for the hitlist, that is, the list of all employees who meet the selection criteria.
    You can specify the fields for the detail screen for a selected employee.
    All selected fields are automatically transferred to the service in the sequence you chose and are then available for selection or output.
    Standard settings
    The standard system contains an InfoSet for the service. It contains default selection and output fields.
    Activities
    1. Check whether the default settings fulfill your requirements.
    2. If you want to change the default values, proceed as follows:
    a) Choose the relevant tab page and remove the indicator in the Use default settings for group box.
    To change the selection fields, choose the Selection Fields tab page.
    To change the fields of the hitlist, choose the Output Fields List tab page.
    To change the fields of the detail screen, choose the Output Fields Detail tab page.
    b) If you want to delete a default field, select the field in the relevant tab page and choose Delete Line from Display Table.
    c) If you want to add an additional field from the InfoSet, select the field in the Fields in InfoSet group box and choose Copy Entry from InfoSet Table. You have two options:
    You select an existing field in the tab page and choose Insert Entry in Display Table. The system copies the InfoSet field and inserts it above the selected entry.
    You select the blank field at the end of the tab page and choose Insert Entry in Display Table. The system copies the InfoSet field and inserts it at the end of the tab page.
    Note that the sequence of the fields in the tab page determines the sequence of the fields in the service.
    The selection screen fields are laid out according to the following pattern (maximum of 4 rows and 20 fields):
    1 I 2 I 3 I13 I17
    4 I 5 I 6 I14 I18
    7 I 8 I 9 I15 I19
    10 I11 I12 I16 I20
    The fields in the detail screen are laid out underneath each other for a maximum of 20 rows, while the fields in the hitlist are laid out from left to right for each row, for a maximum of 20 fields.
    Note: You cannot select by the Employment Status field (P0000-STAT2).
    d) If you want to add a new field that is not in the InfoSet, you have to create a new InfoSet. You then assign the required field to the new InfoSet. Then select the new InfoSet in the InfoSet field in the Parameters group box. Proceed as described above to add the field to the relevant tab page.
    For information about creating InfoSets, see Specify InfoSets for Interactive Employee Selection in the IMG for the HR Information System.
    Not the SAP naming convention for the standard InfoSet: /SAPQUERY/HR_XX_PA_ESS
    The country code "XX" stands for "international." The InfoSet itself is in the global area (cross-client). You can create customer-specific InfoSets by copying an existing entry. Take account of your  customer namespace and set the relevant country code.
    Note: The Personnel Number field (P0000-PERNR) must not be added to the InfoSet. If you want to use the personnel number, use the P0001-PERNR field, for example.
    e) In the Sort field of the Output Fields List tab page, you can specify the sort sequence in the hitlist.
    Example: You have selected the Last Name and First Name fields for the hitlist. You want the hits to be sorted first of all by the employees' last name, then by the first name. You therefore enter 1 for the last name and 2 for the first name in the Sort field.
    f) Once you have completed your modifications, choose Check Display Table. If the check was successful, choose Save to save your changes. If inconsistencies were found during the check, a message in the relevant line notifies you of them.
    Further notes
    In certain circumstances, runtime issues may occur, especially in data selection. If they do, set the Selection Fields indicator in the Use Default Settings for group box. This deactivates the use of the InfoSet Query; instead, the system uses the BAPI_EMPLOYEE_GETDATA method.
    You can switch the hitlist and the detail screen to the BAPI_EMPLOYEE_GETDATA method by setting the Output Fields List and Output Fields Detail indicators.
    Note that by setting an indicator, you restrict the field selection in the relevant tab page to the interface of the method.
    If, in the initial screen, you enter a country for which values have not yet been defined, the system automatically creates an entry that sets all indicators in the Use default settings for group box. You can then edit the entry to suit your requirements.
    You can specify whether you want employees' photos to be displayed in the service in the IMG for Employee Self-Service under Determine User Options.
    If this helps, pl do reward.

  • Database search using Oracle SES

    Hi all..specially Luca,
    I am a new to oracle SES.I have to search my database through oracle SES from my ASP.NET
    pages.
    But before doing it from ASP.NET page , I just want to try serching from the SES tool itself.
    I tried to create Database source type as :
    Home > source > source type = database > create
    then i got a page where i wrote the database connection string , userid , password , and a query (select * from images)
    i clicked next n got another page which says step2 authorization ..
    here again i need to put databse connection string ..for which i m confuse what to put ..
    the entire connection string like "Data Source=atlas/orcl;User ID=yuntaa;Password=yuntaa" or "atlas/orcl" ..
    i put user ID and Password,there wer few more fields like
    Authorization Query,Single Record Query, Authorization User ID Format .i m not sure what to put in this fields,
    and clicked next...i got an error saying ...
    Oracle Secure Enterprise Search Error
    An error occurred while validating the plug-in parameters.
    now i m really confuse how to create database source and how it will search to my search string...how it will know which
    table to search...i mean search string may be audio,video,image or a doc ..according to the string it has execute different
    query to search in different table...
    Plz help me out a little to solve this issue...
    Warm regards and thanks
    Suraj

    Thanks a lot for the reply Raford...n sorry as my question are too long...
    In my project i need to search my database but i do not
    have any URL as i am displaying data straight from the database. The data's
    are audio,video or images which i have stored in database tables itself.
    so in my case the URL column will be empty which is a mandatory field.The URL column contains the Display URL for the document but I do not have any document outside my database.
    The way I am storing the data, is oracle SES posible ?. Most importantly do this will enhance
    the performance..or provide some extra information to the user regarding search...
    Actually what we are thinking is that when user will search and if the data is present in database we will display the data from the database using oracle SES
    or else if the data is not there in the database we will provide some links
    of other web site, something like google..
    Please give some thought on it and tell me whether this is possible using oracle SES...if yes then what should i put in URL column...if posible plz give me some suggestion how should i proceed
    You said If the data is in an Oracle database, it is easier to use the Table crawler. I tried
    to configure that with my table but showing an error in error log :
    EQG-30100: Internal error: java.sql.SQLException: Missing IN or OUT parameter at index:: 2,
    from: CrawlingThread.processPseudoURL() executing SQL BEGIN ?
    := 'http:/tds?id=24'||eq_util.tds_encode(1,?) ||eq_util.tds_encode(2,?)
    ||eq_util.tds_encode(3,?) ||eq_util.tds_encode(4,?) ||eq_util.tds_encode(5,?)
    ||eq_util.tds_encode(6,?) ||eq_util.tds_encode(7,?) ||eq_util.tds_encode(8,?);
    EXCEPTION when others then eq_err.raise; END;; for URL http:/tds?id=-1&k1=24&display_url=0
    EQG-30100: Internal error:
    no new documents collected
    also the crawl statistics is 0..
    also search result is empty..i m searching with the string which is in contenttitle
    column in table which i ve set through "table column mappings"...
    the steps i ve taken to set the table crawler is :
    selected source type as Table > provided source name , port number etc details > local table
    selected primary key column > select content column > create and customise > table column mappings
    Add another row(selected the contenttitle field) > apply > schedule > execute immediatlyWarm regards and Thanks
    Suraj

  • Help !!! - Search using english base alphabet for French diacritic/accent

    Hello -
    I am searching using wild card in Oracle 9i database, as follows -
    select * from test
    where Upper(name) like 'A%'.
    It returns all the names upper and lower beginning with 'A'.
    We do have french data and few of the names begin with Á,Ä and à.
    In order to fetch all of the rows based on the base letter ,ignoring diacritic in the above same query,
    I have tried couple of settings as follows before executing the query -
    ALTER SESSION SET NLS_SORT='FRENCH';
    Or
    ALTER SESSION SET NLS_COMP=ANSI;
    ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER;
    It didnot work. After reading the documentation, I have tried the query, for equality (=) search with some test data and seems to be working...
    So my guess is these settings are only useful if you have same exact name(data) for french as well english. Wildcard search '%' 'like' cases donot work.
    It would be really great if someone knows work-around for the query I have mentioned -
    select * from test
    where Upper(name) like 'A%'.
    to do get all the rows based on generic base letter ignoring those accents/diacritic.
    Or is there any other way we can implement this.
    I need to implement the generic solution for all english alphabets search in our application.
    ANY HELP would be REALLY APPRECIATED....
    Thank you so much....
    Rama...

    Hi Rama,
    For all current versions of the Oracle database, NLS_COMP=ANSI affects the following SQL operators only:
    WHERE =,WHERE >,WHERE <, START WITH, IN/OUT, BETWEEN, CASE WHEN, HAVING, ORDER BY.
    All other operators, such as LIKE, perform comparisons in binary mode only. They do not honor the NLS_SORT value. I hope that explains why you are seeing the behaviour that you described.
    This will be enhanced in 10gR2, where all SQL functions and operators will be able to honor the NLS_SORT value.
    You may be able to use the workaround below, if all your LIKE operations place the '%' at the end.
    e.g.
    ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER;
    SELECT * FROM test
    WHERE NLSSORT (name,1,1) = NLSSORT('A');
    name
    Älex
    andrew
    Ace
    àlan
    Good luck!
    Nat

  • SQL Query to search all the tables for a given string

    Hi all,
    This is concerning a query to search each and every table/column for a given string.
    I came across a similar post (Re: question about searching 600 tables and this query seems to be inline with my requirements:
    select table_name,
    column_name,
    :search_string search_string,
    result
    from cols,
    xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
    columns result varchar2(10) path '.'
    where table_name in ('MY_TABLE')
    However, I am getting the following error:
    ORA-24451: OCIKCallPushTrusted, Maximum call depth exceeded
    I am using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit and could you please let me know the best possible way to accomplish this task?
    Thanks.
    Edited by: itech.quest on Sep 19, 2010 8:30 AM

    Hi Tamir,
    Thanks so far. I am yet to make the crucial breakthrough as far my application goes. Are you talking about the EUL5_QPP_STATS table? I tried retrieving worksheets even from that table also with the following query
    SELECT DISTINCT Eul5QppStats.QS_DOC_NAME,Eul5QppStats.QS_DOC_DETAILS
    FROM EUL5_QPP_STATS Eul5QppStats,EUL5_DOCUMENTS Eul5Documents
    WHERE Eul5QppStats.QS_DOC_NAME = Eul5Documents.DOC_NAME
    However, the worksheet data retrieved by Discoverer Oracle's product is not matching my dataset for every workbook. Please suggest.
    Reg
    Thomas

  • Query to search for independent DO

    Hi experts,
    I need a query to search for independent DO (DO without SO). I have been trying for quite sometime but the results appear to be duplicative and irrelevant. This is the syntax that I am using now,
    SELECT DISTINCT T0.[DocNum] as 'SO#', T0.[DocStatus], T0.[DocDate], T0.[CardName], T1.[ItemCode], T1.[Quantity], T3.[DocNum] as 'DO#'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    RIGHT JOIN DLN1 T2 ON T2.TrgetEntry = T1.DocEntry
    INNER JOIN ODLN T3 ON T2.DocEntry = T3.DocEntry
    I think there are something wrong with the syntax but I just can't figure out where is wrong. Please help.
    Thank you.
    Best Regards,
    Alex

    Hi Alex,
    Try this,
    SELECT DISTINCT T0.DocNum as 'SO#', T0.DocStatus, T0.DocDate, T0.CardName,
    T1.ItemCode, T1.Quantity, T3.DocNum as 'DO#'
    FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    RIGHT JOIN DLN1 T2 ON T2.TrgetEntry = T1.DocEntry
    INNER JOIN ODLN T3 ON T2.DocEntry = T3.DocEntry
    WHERE T2.[BaseRef] = ' '
    OR
    SELECT T0.[DocNum], T0.[DocStatus], T0.[DocDate], T0.[CardCode], T0.[CardName],
    T1.[ItemCode], T1.[Dscription], T1.[Quantity]
    FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE T1.[BaseRef] = ' '
    Regards,
    Madhan.

  • Clues about query's - Search for date type at INBOX

    Hello Everyone,
    At IC Webclient, does anyone experiment to add a new search date type at INBOX, at "search for date" search parameter?
    I added a new date type at Date Management, ZDATA_PR.
    When I try to assemble the query parts, I use something like this:
    CL CL_CRM_QUERYAUI_RUN_BTIL
    METH READ_BUSINESS_TRANSACTIONS
    CALL METHOD cl_crm_report_qupart=>get_qupart_by_token
        EXPORTING
          iv_token     = 'DAT'
          iv_date_type = 'ZDATA_PAR'
          iv_from      = ls_query_aui-from
          iv_to        = ls_query_aui-to
        IMPORTING
          ev_qupart    = ls_qupart_range-querypart.
      APPEND ls_qupart_and   TO lt_query.
      APPEND ls_qupart_range TO lt_query.
    However, I'm rewarded with an error message telling me that I have problems with the query.
    Does anyone can give me clues how to perform this action? I'm clueless and there's not almost no information about this...
    Thanks and Kind Regards
    Bruno Garcia

    Just to solve a mistake at example code:
    CALL METHOD cl_crm_report_qupart=>get_qupart_by_token
    EXPORTING
    iv_token = 'DAT'
    iv_date_type = 'ZDATA_PR'
    iv_from = ls_query_aui-from
    iv_to = ls_query_aui-to
    IMPORTING
    ev_qupart = ls_qupart_range-querypart.
    APPEND ls_qupart_and TO lt_query.
    APPEND ls_qupart_range TO lt_query.
    does anyone has a suggestion or a clue to give?
    Thanks
    Bruno

  • FORMATTED SEARCH USING SCREEN ENTRIES

    Hi ,
        i want use formatted search to do the following without using variable entry ( without the define survey variables window opening when i execute the query):
    Example: When you enter a purchase order, the item search should propose only those items where the vendor entered in the Default Vendor field of the master record is the same as the vendor specified in the Vendor field of the purchase order.
    i found the following explaination in the SAP B1 training material which is not all clear enough.
    "To do this, you define a query that contains the Vendor field from the purchase order as the condition for the Default Vendor field. You then define this query as a formatted search for the Item no. field in the purchase order entry screen. "
    i wrote a query which pretty much does what i want but , after i enter the vendor code in the purchase order header data  and go to the item field and press shift+F2, instead of just proposing only those items which the  above vendor  sells , a "define survey variables"  window opens and i will have to again choose the same vendor i just choose in the "vendor field in the header data" of the purchase order.
        can anyone plz help me out with this ???

    Hi adrian,
                 thank for ur reply, and plz pardon me for my ignorance..
             i tried using the query u gave me in a query generator and the wizard, but i am getting a couple of syntax errors..and not only the query u gave but any query i have used from this forum ... so i was wondering if i am doing anything wrong..so i ll explain to you how i used your your query so may be u can tell me where i am going wrong..
    i went to the query generator selected the table OITM  and choose the item code and description from that table for the SELECT field and then put the cursor on the WHERE field and typed the condition in the query you gave me for the WHERE field .. and then executed it.. didnt work ..
    Then in the result window of the query generator(and wizard) i went to the write mode of the SOL statments field  and copied and pasted the query you sent me... and then executed it... still doesnt work... and like i said this happens to all the queries i find here in the forum ..  
    can u help??

Maybe you are looking for

  • IMac will not boot after 10.10.2 update

    Hello all, I could really use some help. I downloaded 10.10.2 from the app store on my iMac (previously upgraded to Yosemite through app store), and when the system restarted, I would see the white screen with the apple logo and the progress bar abou

  • Using a Table Trigger to Trap Error Codes Returned to a SQL Loader seeion

    I would be grateful if anyone knows how to go about this. I am trying to insert into a table, details of SQL Loader's rejected records by possibly using a trigger on the loading table to try and trap the error code returned to SQL Loader. What I am t

  • Auto open Itunes when plug in Iphone

    My mac used to open Itune when i pluged in my ipone but now it opens iphoto and not itunes. I can open itunes manualy and the phone is there and works fine but i would like it to open it when i plug in not iphoto. Any ideas. (4s iphone)

  • ORDER BY clause with expression

    Considering that all the column names and table name is valid, what happens internally when the following query is run? SQL> SELECT STU_ID, STU_NAME FROM STUDENT ORDER BY 2+3, STU_ID; What i found out was the rows get ordered in ascending order of ST

  • Want to know about user, tcode,start of tcode time

    hi, I want to know who did it, which TCode and when time of excute of the particular transcation run by user. Do sap as any report or TCode which will give me the details of who(user),when(start time),which ( TCode) the user excuted the TCode, And wh