Parameter to search within a field

Post Author: hd1
CA Forum: Crystal Reports
Hello,
I have a report that is connected to SQL database.  I was wondering if there was a way to create a parameter to search within a specific field in my database table.  The scenario is we have Paralegals and Attorneys who have created a huge Word document that has a table in it.  They have 8 fields in this table and one field in particular is their summary field.  This field can go up to over 1000 characters.  So, we decided to create a SQL database and have them import their data from a Data Access Page using Microsoft Access, then we run a Crystal Report for them. So far it looks good and it's working great.  We can import there current data without any problems.  The problem that I have run into is the way they search for specific entries.  I was wondering if I could create a parameter in the report to search within the summary field.  Again these summary fields can be from one sentance to multiple paragraphs.  I would like to be able to get this going for them, it will make things a lot easier on them. An example would be.  We have multiple entries in this field.
This is a test entry done 11/27/07
This is a test entry done 12/3/07
This is a test import using DTS done 12/3/07.
Now it would be nice if the users could put in the word 'DTS' in the parameter and it would only show entries containing DTS.  Do you think this is possible. 
I ran accross a posting by Skodidine and his was something like this.
{table.field} LIKE & "*"
But that was relating to a wild card search.  I tried just using {table.field} LIKE but I didn't get any results.  This does sound possible though.

Post Author: hd1
CA Forum: Crystal Reports
So far this seems to give me some results.
IF {?Summary} = "<none>" THEN TRUE ELSE ({?Summary}) IN LowerCase ({LOEB_Docs.Summary})
I don't know though, If someone has a more reliable and better one could you let me know?   I did have to add some words in my parameter, by the looks of it, I will have to do that from now on.  So if someone has something better to where I do not have to enter keywords for them, I would appreciate it.  This database is going to continue to grow, it's a reference for them so the keywords could be endless.

Similar Messages

  • How can I use SQL to search for a pattern within a field?

    Hello, Frank, Solomon, ect
    I am now faced with this particular scenario, I've got the SQL to search through a field to find text within the field, but I have to know what it is before it can look for it.
    What I have to do is this:
    Search through a field, for a pattern, and I won't know what the data is I am looking for. Can this be done in SQL?
    For instance, Here is my SQL this far, I was helped allot in order to get to this point.
    select table_name,
           column_name,
           :search_string search_string,
           result
      from (select column_name,
                   table_name,
                   'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
              from cols
             where table_name in ('TABLE1', 'TABLE2')),
           xmltable (str columns result varchar2(10) path '.')
    When you execute the above SQL, you have to pass in a value. What I really need is to alter the above SQL, to make it search for a pattern that exist's within the text of the field itself.
    Like for instance, lets say the pattern I am looking for is this" xx-xxxxx-xxxx" and it's somewhere in a field.
    I need to alter this SQL to take this pattern and search through all the schemas and tables to look for this pattern match.
    Can be done?

    When you use something dynamically within a function or procedure, roles do not apply and privileges must be granted directly.  So, you need to grant select on dba_tab_cols directly.  If you want to do pattern matching then you should use regular expressions.  The following example grants the proper privileges and uses regexp_instr to find all values containing the pattern xxx-xxxx-xxxx, where /S is used for any non-space character.  I limited the tables in order to save time and output for the test, but you can eliminate that where clause.
    SYS@orcl> CREATE USER test IDENTIFIED BY test
      2  /
    User created.
    SYS@orcl> ALTER USER test QUOTA UNLIMITED ON USERS
      2  /
    User altered.
    SYS@orcl> GRANT CREATE SESSION, CREATE TABLE TO test
      2  /
    Grant succeeded.
    SYS@orcl> GRANT SELECT ON dba_tab_cols TO test
      2  /
    Grant succeeded.
    SYS@orcl> CONNECT test/test
    Connected.
    TEST@orcl> SET LINESIZE 90
    TEST@orcl> CREATE TABLE table1
      2    (tab1_col1  VARCHAR2(60))
      3  /
    Table created.
    TEST@orcl> INSERT ALL
      2  INTO table1 (tab1_col1) VALUES ('xxx-xxxx-xxxx')
      3  INTO table1 (tab1_col1) VALUES ('matching abc-defg-hijk data')
      4  INTO table1 (tab1_col1) VALUES ('other data')
      5  SELECT * FROM DUAL
      6  /
    3 rows created.
    TEST@orcl> CREATE TABLE table2
      2    (tab2_col2  VARCHAR2(30))
      3  /
    Table created.
    TEST@orcl> INSERT ALL
      2  INTO table2 (tab2_col2) VALUES ('this BCD-EFGH-IJKL too')
      3  INTO table2 (tab2_col2) VALUES ('something else')
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    TEST@orcl> VAR search_string VARCHAR2(24)
    TEST@orcl> EXEC :search_string := '\S\S\S-\S\S\S\S-\S\S\S\S'
    PL/SQL procedure successfully completed.
    TEST@orcl> COLUMN "Searchword"     FORMAT A24
    TEST@orcl> COLUMN "Table"     FORMAT A6
    TEST@orcl> COLUMN "Column/Value" FORMAT A50
    TEST@orcl> SELECT DISTINCT SUBSTR (:search_string, 1, 24) "Searchword",
      2               SUBSTR (table_name, 1, 14) "Table",
      3               SUBSTR (t.column_value.getstringval (), 1, 50) "Column/Value"
      4  FROM   dba_tab_cols,
      5          TABLE
      6            (XMLSEQUENCE
      7           (DBMS_XMLGEN.GETXMLTYPE
      8              ( 'SELECT ' || column_name ||
      9               ' FROM ' || table_name ||
    10               ' WHERE REGEXP_INSTR
    11                     (UPPER (' || column_name || '),''' ||
    12                  UPPER (:search_string) || ''') > 0'
    13              ).extract ('ROWSET/ROW/*'))) t
    14  WHERE  table_name IN ('TABLE1', 'TABLE2')
    15  ORDER  BY "Table"
    16  /
    Searchword               Table  Column/Value
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE1 <TAB1_COL1>matching abc-defg-hijk data</TAB1_COL1>
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE1 <TAB1_COL1>xxx-xxxx-xxxx</TAB1_COL1>
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE2 <TAB2_COL2>this BCD-EFGH-IJKL too</TAB2_COL2>
    3 rows selected.

  • Workarounds for searching a text field in SQL Server 2000

    Hi,
    I have a need to search within a text field in SQL Server 2000. In the
    limitations section it notes that this is not possible. Is there a
    recommended workaround for this in terms of performance? I have no way
    of knowing the length of the text field in advance, and this could be
    fairly large. Also, the number of objects that could contain the text
    can be fairly large as well.
    Thanks in advance,
    Khamsouk

    Note that some databases (or Oracle, at least) provide alternatives to
    LIKE '%foo%' that are more efficient for large text blocks, given that
    you have the appropriate indexing plugins etc. etc.
    To use one of those types of search operators, you'd have to put
    together a custom extension.
    -Fred
    Fred Lucas <[email protected]> wrote:
    I'm assuming that when you say 'a text field', you're referring to a
    SQLServer TEXT field, as opposed to just any old field that contains
    text.
    Like I said, I'm by no means a SQLServer pro, but I just ran:
    SELECT CLOBSTRINGX
    FROM LOCATORTESTOBJECTX
    WHERE CLOBSTRINGX LIKE '%o%';
    and got back my test row with 'foo' in the CLOBSTRINGX column.
    CLOBSTRINGX is a TEXT column.
    So, it is possible that our stringContains() extension will just work.
    But then again, maybe not. I'm guessing it will.
    Give it a try and, if you get an error, post the generated SQL (turn on
    SQL output by setting the com.solarmetric.kodo.Logger property to
    'stdout') and the error that you get. Also, try executing the generated
    SQL directly against your data store to see if it works there.
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Basically I just want to use kodo's extended stringContains syntax on a
    text field. Is this possible?
    Khamsouk
    Fred Lucas wrote:
    I'm not intimitely familiar with SQLServer's text searching
    capabilities, but I'm confident that you could create a query extension
    that would do what you need it to do.
    What is the SQL that you are trying to generate?
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Hi,
    I have a need to search within a text field in SQL Server 2000. In the
    limitations section it notes that this is not possible. Is there a
    recommended workaround for this in terms of performance? I have no way
    of knowing the length of the text field in advance, and this could be
    fairly large. Also, the number of objects that could contain the text
    can be fairly large as well.
    Thanks in advance,
    Khamsouk
    Fred Lucas
    SolarMetric Inc.
    202-595-2064 x1122
    http://www.solarmetric.com

  • How to search within category in a community?

    Searching within a community is helpful, but narrowing my search to a category within a community would be really nice!
    How do I do this?
    Thanks in advance to all,
    Kurt

    Click the Search button, with or without any search terms provided. Then, select a community in the "Restrict to a Community" field. Note that you have to start typing something, and a list of possible matches will appear. Fill in a search string if you didn't already, then click the Search button again.
    Edit: never mind, I responded too fast. I don't know of a way to restrict to a particular category.

  • Why is the search and logins fields are black when using AOL

    Why is the search and logins fields are black when using AOL??

    M3nth,
    Seems like we're all asking the same question
    As tst says... try not to use the one at the bottom.. it's ... hummm..
    It's behavior is unpredictable...
    As for the multiple listing I'll have to read Molly's response on this (I asked the same question is the "Xtreme thread")
    JLV
    === EDIT ===
    Hi Molly,
    I read your answer on the bottom search engine..
    That's what I thought it did... but it didn't work for me.. I tried to use it to find some of my own posts within LV.. and it didn't find anything.
    The search was : serial
    I did this while reading a LV question of the subject.
    I shall experiment with the search engine again and report my findings.
    R.Message Edited by JoeLabView on 03-17-2005 02:24 PM

  • Add parameter in search help PREMJ

    Hello,
    Currently, search help PREMJ only has parameter Last name, First name, Title, Birth date, Personnel Number, Start date and End date. There's a request to add below new parameter to search help PREMJ:-
    1. Position Title
    2. Personnal Area
    3. Personnal SubArea
    4. Payroll Area
    5. Org Unit
    4. Company Code
    This search help is standard SAP and I don't think we can change it. Functional team did analysis and no related config to add new parameter. Therefore, do we have any other way to add new parameter in search help?Is there any big impact to make these changes?
    Please advice.
    Thanks and Regards,
    Fauziah

    Hi
    It depends on if you need to change it or a collective search help where PREMJ is used,
    PREMJ is an elemantary search help so you can only add a new field by changing it, SAP allows to do it, but you make sure the paramater you need is in the view M_PREMJ, else you need to change it too (in this case you need the access key).
    If you needs to change a collective search help, you can enhance it by an APPEND SEARCH HELP
    Max

  • When trying to search within documents in DMS

    Hello SAP,
    When trying to search within documents in DMS, no documents can be
    found.
    To reproduce error, we go to CV04N, enter TEST in field Srch txt.
    Press F8.
    Its saying "No document found with selected parameters".
    Kindly suggest what can be done to resolve this issue.
    Regards,
    Munish Jindal

    Hello,
    Check in table DRAW & DRAD to figure out the DIR's. To check the physical attachment then check DMS_PH_CD1 table.
    With the help of DRAW and or DRAD you can take document ID and display DIR in CV03N or CV04N.
    -Thanks,
    Ajay

  • How can I search the BCC field of my sent mails?

    Does anybody know how it is possible to convince mail.app (mail.app 4.6 under OSX 10.6.8 , in my case) to perform a search within the bcc. field of sent emails?
    Thanks for the advice

    I am running Thunderbird v 24.2.0 under Bodhi Linux (Ubuntu derivative).
    I click on the Address Book button to open my address book.
    Then I click Edit > Search Addresses.
    This opens a detailed dialog box called Advanced Address Book Search.
    First, I can choose which address book(s) to search.
    Then I can use a drop-down menu to choose various fields and search criteria, to build a regular expression for searching. It is actually quite comprehensive.
    The only problem for me is: Most of my key words are located in the "Other" field, which is not included in the drop-down list. Very frustrating. The information is there, but it cannot be accessed with this tool. (At least, I have not figured out how to do so.)

  • Text search within pdf

    has anyone found a way/app that lets you do text search within a pdf? 
    thanks.

    You should be able - when I have a PDF open in Safari, then the search field at the top right of Safari will search within the PDF. Whether it works with all PDF documents I don't know.

  • How do you search within a page in safari on ios 7?

    In ios6 you could search within a page on safari, but I can't find the search since updating to ios7.
    Surely this is a severe deficiency?

    If I tap on the URL field then yes, you are taken to a screen with your favorites, but if then start typing in the URL field you should get something like :
    Tap on a result below the 'on this page' to go back to your webpage and that occurence should be highlighted

  • Performing a search within multiple .as files

    In Flash CS4 is it possible to perform a search within
    multiple .as files, or an entire project?
    thanks!

    I'm don't know if that's possible on CS4, but you can search
    using the OS searching tools:
    I'm not sure about Mac OS, but on Windows, you can click on
    Start, Search, and under the Containing Text field, you can type in
    'trace' (without quotes). Then click on the drop-down box under
    'Look In:' and select Browse...
    Browse to the location of your project and select it, then
    click the Search Now button to begin searching through the files
    there.
    It will at least tell you which file(s) have trace in them.
    Once you know that, then you can search through the file using CS4
    to find the actual command. It would be much more convenient to
    have that as a feature in CS4, but I don't know if it is.

  • Search within iPhoto by any word or combination of words

    Hello!
    I want to notice, and may be in the future (I hope soon), Apple will add a very useful improvements in the search within iPhoto.
    When I search anything in iPhoto I need to enter the search condition the same as it was entered in the photo description or tagged a face. For example when I want to find all photos with someone's name "John Doe" I need to enter in search field John… and so on with big "J", but when I want to search just with "john" (with small "j" symbol) or by last name "doe" - the search returns nothing! Or when I want to search any combinations of words that I entered in description of the photo with any symbols register ("A" or "a") that doesn't work too! The same with Face tags when I want to tag someone I need to enter the name right the same way it entered in the address book, not any symbols that persist in the contact name.
    Didn't think anybody it is useful feature must be improved?
    Thank you all!

    Hello Larry.
    Of course I'm using this feature too. Generally I talk about search conditions/expressions. By the way in smart albums the same problem with search expressions. When I want create a smart album with my friend "Smith" for example and in the Smart album search criterias enter "smith" with small "s" then my friend doesn't appear in this album while I don't change the name as it witten in address book "Smith" with big "S".
    You see?

  • How can I reliably search the "Notes" field in iOS?

    I know this isn't strictly an Applescript question, but I've found that the level of knowledge in this particular section of the boards is WAAAAAYYY higher than other sections, so I'm gonna ask this here anyway. FWIW, it does involve AppleScript....
    So I really miss the Palm style contact search by first initial and last name. So I wrote an applescript that runs nightly on my iMac and updates any new contacts to include this search term in the notes field. Actually, to be completely honest, some members of this forum wrote most of the script for me.... Anyway, for instance, Joe Smith has "JSmith" placed into the notes field.
    Now, usually when I search my contacts like this on my iphone it works like a dream. But sometimes the expected contact does not appear. In those cases, if I open the contact a different way (by searching for "Joe Smith," for instance, I find the contact, open it up, and always find that "JSmith" is actually in the notes field. My Applescript is working like clockwork... that's not the problem. Once I close the Joe Smith contact and retry the "JSmith" search, it now works. What gives?
    It's kinda like Spotlight is using a search index for the notes field but not the name itself? And the search index is not getting updated until I manually open the contact? But only on some contacte? Usually it updates itself just fine without my having to open the contact? And then today it failed to find a contact that has had the Palm-seach term in the notes field for at least three weeks. Once I opened it manually, though, it worked.
    So... help! Is there a way to force the iphone to manually rebuild whatever database spotlight is using to search the notes field? What's going on?

    I've turned on BOLD TEXT and turned on REDUCE MOTION but for me it feels like more than just the zooms in and out... I'm getting sick just reading emails and texts or just glancing at the lock screen. It's intant nausea. The only thing I can think of is that it's something to do with refresh rate or frequency of the screen.
    I thought I'd just get used to it but it has not subsided. I only hope I don't have to resort to backgrading to iOS 6 or worse, moving to a different brand of phone.

  • Searching for the fields of a table(very very urgent)

    Hi all,
    i am in graet trouble now.i am searching for the fields like
    1)country of origin where the finished good is created.
    2) customer sales order number
    3)customer sales order line number
    i am writing a report for delivery order.in this report i have to refer customer PO & customer SO .
      i mean, my company has a customer ( seagate) & seagate has a customer (let maxtor).initially maxtor will give a PO to seagate then seagate will raise a SO againest maxtor.
       Then seagate will send PO number(of maxtor), PO line number,SO number(seagate), SO line number(seagate) to our company.
       Then i have to write a report for sales order & delivery order.in these reports i have to refer seagate PO number & seagate SO number for reference.
    i got PO number as vbkd-bstkd but not getting any field for reference Sales order.plz advice me on this. it is very very urgent.
    ur idea is highly appreaciated.
    Thank u very much.
    Regards
    pabitra

    check out tables VBAK(sales order header), VBAP(sales items)

  • How to search for a field and its value in an internal table

    Hi,
    I want to search for a field(which i dont know whether it exists or not) in an internal table and on finding that field, I have to update the value of that field. How do I do it? I think its similar to how SEARCH works but i wanted to know the internal table eqivalent of it.

    Hi Sujay,
    this code will help ful to u, just gi through it,
    TABLES : KNA1,VBAK,VBAP.
    ***********INTERNAL TABLE DECLARATIONS****************
    DATA : IT_KNA1 TYPE TABLE OF KNA1,
           WA_KNA1 TYPE KNA1.
    DATA : IT_VBAK TYPE TABLE OF VBAK,
           WA_VBAK TYPE VBAK.
    DATA : IT_VBAP TYPE TABLE OF VBAP,
           WA_VBAP TYPE VBAP.
    START-OF-SELECTION.
      SELECT * FROM KNA1
      INTO TABLE IT_KNA1
      WHERE KUNNR = P_CUST.
      IF NOT IT_KNA1 IS INITIAL.
        SELECT * FROM VBAK
        INTO TABLE IT_VBAK
        FOR ALL ENTRIES IN IT_KNA1
        WHERE KUNNR = IT_KNA1-KUNNR.
        IF NOT IT_VBAK IS INITIAL.
          SELECT * FROM VBAP
          INTO TABLE IT_VBAP
          FOR ALL ENTRIES IN IT_VBAK
          WHERE VBELN = IT_VBAK-VBELN.
        ELSE.
          WRITE : / 'Customer',P_CUST,'does not exist ......'.
        ENDIF.
      ELSE.
        WRITE: / 'sales order does not exist for',P_CUST.
      ENDIF.
    Rewards points plz if useful
    Ganesh.

Maybe you are looking for