SQL for WILDCARD searching

Good Day,
Hi MASTER's got a little problem
got a table
DIESEL_DETAIL
DATE_PO
PLATE_NO
DRIVER_NAME
I NEED TO SEARCH HERE'S MY QUERY
SELECT * FROM DIESEL_DETAIL
WHERE TO_CHAR(DATE_PO,'DD-MON-YYYY')
BETWEEN :P1_FROM
AND :P1_TO
AND PLATE_NO = :P1_PLATE_NO
OR DRIVER_NAME = :P1_DRIVER_NAME
ITS WORKING PERFECTLY BUT ITS MUST HAVE A VALUE
WHAT I WANT TO TO IS WHAT IF THE USER NOT INPUT THE VALUE
IT WILL AUTOMATICALLY EXECUTE THE WILDCARD SEARCH
IF THERE'S A POSSIBLE WAY?
THANKS MASTER'S GOOD DAY..

hERE IS THE ANSWER IN MY QUESTION
select     "DIESEL_DETAIL"."PO_ID" as "PO_ID",
     "DIESEL_DETAIL"."PO_NO" as "PO_NO",
     "DIESEL_DETAIL"."DATE_TIME_PO" as "DATE_TIME_PO",
     "DIESEL_DETAIL"."ISSUED_BY" as "ISSUED_BY",
     "DIESEL_DETAIL"."PLATE_NO" as "PLATE_NO",
     "DIESEL_DETAIL"."DRIVER_NAME" as "DRIVER_NAME",
     "DIESEL_DETAIL"."TRUCK_TYPE" as "TRUCK_TYPE",
     "DIESEL_DETAIL"."SO_NO" as "SO_NO",
     "DIESEL_DETAIL"."FROM_DES" as "FROM_DES",
     "DIESEL_DETAIL"."TO_DES" as "TO_DES",
     "DIESEL_DETAIL"."TOTAL_KM" as "TOTAL_KM",
     "DIESEL_DETAIL"."DIESEL_CONSUPM" as "DIESEL_CONSUPM",
     "DIESEL_DETAIL"."DIESEL_COST" as "DIESEL_COST",
     "DIESEL_DETAIL"."DATE_CONSUME" as "DATE_CONSUME"
from     "DIESEL_DETAIL" "DIESEL_DETAIL"
WHERE TO_CHAR(DATE_TIME_PO,'DD-Mon-YYYY')
BETWEEN NVL(:P105_FROM,TO_CHAR(DATE_TIME_PO,'DD-Mon-YYYY'))
AND NVL(:P105_TO,TO_CHAR(DATE_TIME_PO,'DD-Mon-YYYY'))
AND ((:P105_PLATE is null) or (PLATE_NO LIKE '%' || :P105_PLATE || '%'))
THANKS TO
Shankar Viji
YOU HELP A LOT!!!
GIVE YAH POINTS!
AND TO OTHER HELPFUL POINTS.. THANKS

Similar Messages

  • How to frame the select query for wildcard search.

    Hi Experts,
    I have an input field P_USERALIAS.This value could contain the actual value or the wildcard for example : user can enter P_USERALIAS as SAP123 or S or SAPABC123 . I need to generate a dynamic search on table USREFUS  depending on what has been entered.Please help.
    Useful answers will be rewarded.
    Regards,
    Shrita Sharma.

    THIS IS A TEST REPORT FOR WILDCARD SEARCH**
    TABLES: USREFUS.
    PARAMETERS: P_NAME1 TYPE string.
    RANGES: R_NAME1 FOR USREFUS-USERALIAS.
    DATA: T_usrefus LIKE usrefus OCCURS 0 WITH HEADER LINE.
    *replace
    if p_name1 cs '*'.
    replace all occurrences of '*' in p_name1 with '%'.
    SELECT * FROM usrefus
    INTO TABLE T_usrefus
    WHERE useralias like P_NAME1.
    else.
    SELECT * FROM usrefus
    INTO TABLE T_usrefus
    WHERE useralias = p_name1.
    endif.
    LOOP AT T_usrefus.
    WRITE: / T_usrefus-useralias.
    ENDLOOP.
    **THANKS & REGARDS
    SHRITA SHARMA.

  • Wildcard searches for WBS element

    HI Experts,
    Can anyone give a example prgm for wildcard searches to WBS element LIPS-PS_PSR_PNR field.
    Thanks in advance.

    Hi,
    This is standard system behaviour. Purchase requisitions generated by MRP do not add to commitment. However, when these PRs are converted into POs, the POs add to commitment. Purchase requitions genertaed directly from PS, without the intervention of MRP always add to commitments.
    Regards
    Muraleedharan.R

  • PL/SQL code for a search button

    i'm trying to write a PL/SQL for a search button , like in this picture
    http://uppix.net/f/7/1/484994cbbb235d7041484588c2463.jpg
    i tried this
    begin
    SELECT employee_id , first_name , last_name , manager_id , department_id
    into
    :employee_id , :first_name , :last_name , :manager_id , :department_id
    FROM EMPLOYEES WHERE :DEP_ID = :DEPARTMENT_ID;
    end;
    but it didn't work
    hope someone can help
    thanks.

    Welcome to the forum.
    From your link it shows you're using Form Builder as your development tool.
    Therefore your question belongs to the Forms Forum @ Forms and not so much in this forum.
    Keep in mind to read the FAQ's you'll stumble upon in several forums, so you know what to post and what not to post.
    For example, here's the SQL and PL/SQL FAQ:
    Re: 3. How to  improve the performance of my query? / My query is running slow.
    but it didn't workThat;s something you should not post.
    Be more specific.
    If you get an error message, then post the exact error code and message.
    Always mention your database version and your Forms version (if Forms is involved).

  • Problem with: wildcard search in Endeca with Russian language, or adding custom stemming dictionary

    Hi endeca-gurus. I need your assist in typeahead functionality to implement it with endeca (also we should able to search within * from search input-field). So, per documentation, OLT doesn't support wild card search, but latin-1 does it. So,  I tried to switch to Latin-1, but it doesn’t work…maybe I performed some mistakes :
    1.created file stemming file named ru_word _ forms _collection.xml and added it to the MDEX..\conf\stemming\custom directory:
    <?xml version="1.0"?>
    <!DOCTYPE WORD_FORMS_COLLECTION SYSTEM "word_forms_collection.dtd">
    <WORD_FORMS_COLLECTION>
      <WORD_FORMS>
        <WORD_FORM>ноу</WORD_FORM>
        <WORD_FORM>ноут</WORD_FORM>
        <WORD_FORM>ноутб</WORD_FORM>
        <WORD_FORM>ноутбу</WORD_FORM>
        <WORD_FORM>ноутбук</WORD_FORM>
      </WORD_FORMS>
      <WORD_FORMS>
        <WORD_FORM>sm</WORD_FORM>
        <WORD_FORM>sma</WORD_FORM>
        <WORD_FORM>smar</WORD_FORM>
        <WORD_FORM>smart</WORD_FORM>
      </WORD_FORMS>
    </WORD_FORMS_COLLECTION>
    2. set USE _STATIC _WORDFORMS="TRUE" in <appname>.stemming.xml;
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <!DOCTYPE STEMMING SYSTEM "stemming.dtd">
    <STEMMING>
    <STEM_RU ENABLE="TRUE" USE_STATIC_WORDFORMS="TRUE"/>
    </STEMMING>
    3. run baseline_update script
    4. try to search with params in endeca_jspref:
    N=0&Ntk=All&Ntt=ноут*&Nty=1&D=ноут*&Ntx=mode+matchall&Dx=mode+matchall
    And search result is zero.. ((
    What the encoding should be for the edited files? any other suggestions for doing it?
    and, common question : willl endeca support wildcard search for russian in close future??

    Did you enable the dimension for wildcard search?  In dev studio, in the dimension pane there is a button called configure search, click it and check the wildcard search checkbox in the dialog.  I think you may have the stemming entry right but as OLT is fairly new I have not had a chance to test changing the default analyzer as yet. If my suggestion does not work or you have already applied the wildcard flag then I will dig a little deeper.
    best
    Terry

  • Wildcard Search requirement for Items description and BP Name

    Hi Friends,
    I want to know is there any feature in Item Master data or Business Partner Master Data in which search is done by putting middle or last name. For example the Item Name is Electric Motar 345 Gear
    and when the user wants to search it by say Motar 345 then all items which inclused Motar 345 should come highlighted.
    Same for BP also its required as BP name is Glem Tex Japan Pvt Limited and now user wants to search the BP by say Tex Japan and all BP which includes the word Tex Japan should come.
    Is there any possibilities by which this can be achieved. Its somewhat wildcard search required. I heared its possible in B1.
    Regards,
    Kamlesh Gupta

    Dear Sridharan,
    I have exactly put the same as 'Motar 345 after Opening the Item Master Data and in find mode pressed * Enter and put the above in Find and selected Item Description. But sorry to say that nothing is coming and the cursor goes in the last item master data.
    What might be the problem can you please tell me.
    Regards,
    Kamlesh Gupta

  • Wildcard search for numeric values using select ?

    Hi,
    I want do wildcard search for numeric fields of the table.
    For charcter/string i have used - select * from XX_TABLE where param1 like 'SS%'. But this query doesnt work when para1 is numeric. Please let me know first whether this is possible ? if yes how to achieve it ?
    Thanks in advance,
    Shrinivas

    Hi Jack,
    The numeric field is of  8 digits, so when i give search critera as '66', it should return values 66000000, 660000, 6600 etc. so i was not able to give between some range. I also tried storing all these values in internal table and the segregate the values it contains '66*'. This worked well but requires lot of coding effort.Please suggest if you guys have any better method ?
    Thanks,
    Shrinivas

  • Fix for SOLR searches beginning with wildcard?

    All, I am having problems finding clear answers on if the above was corrected in ColdFusion 10. 
    I can't get my head around the idea of SOLR not allowing search criteria to begin with a wildcard.  I've seen a solution for reverse wildcard searching, which is great as long as I specify criteria for which I know the ending letters.  For example, if I am looking for all entries ending in "ing", I could do a search on "*ing", using the reverse wildcard to find "gni*".  I have yet to see, or come up with, a solution for a SOLR search with wildcards in the start and end of the criteria.  For example, lets say I am looking for any word with "fus" in the middle, such as "confusing" or "perfusing" or "profusely".  I would want to do a search such as "*fus*".  From what I understand thus far, this cannot be done in SOLR?
    Thanks,
    Tom

    ColdFusion will support whatever Apache solr supports as it is the underlying engine we are using.
    And Solr does support it: http://lucene.apache.org/solr/api/org/apache/solr/analysis/ReversedWildcardFilterFactory.h tml
    I think this is an egregious hack, but still, it's the way they've chosen to support it.
    Solr technically disables support of leading wildcards by default in the traditional query parsers due to concerns about query performance since it tends to select a large percentage of indexed terms.
    Be that as it may, this should be my decision, as the maintainer of the index, not your decision to blanketly disallow it.  If it's available, then one can use it if one choses, or not use it for the reasons you cite.  If you blanketly disallow it, you're removing the ability for me to make that decision.
    It's also a bit of a backwards compat issue, innit?  Verity allowed leading wildcards.
    Adam

  • Wildcard search for field PLKO-PSPNR

    Hello Experts,
    I am using field PSPNR from table PLKO in my selection selection screen. So when i search with F4 buton ,it works , but when i use wildcard  search i.e  B1   , it doesnt work. The reason for this is PSPNR field uses conversion routines within .
    But then my user wants this wildcard search in the report. Is this possible ? Please advice.
    Thanks and Regards,
    Swapnil

    Hi Swapnil,
    <li>Define select-options for PLKO-PSPNR like below.
    TABLES:PLKO.
    SELECT-OPTIONS: s_pspnr for plko-pspnr NO INTERVALS no-EXTENSION.
    <li>The above select-options looks like parameter and then now pass this s_pspnr in the WHERE condition like below
    SELECT * FROM PLKO INTO TABLE it_plko WHERE pspnr IN s_pspnr. "Like that ..
    Thanks
    Venkat.O

  • Jabber for Windows - wildcard search against LDAP directory

    Hi all,
    I have set up an on premise environment with CUCM, CUPS and a 3rd party LDAP Directory. For CUPC everything is working fine. For Jabber for Windows it took me some time to find the correct jabber-config.xml settings to make it working.
    At the moment I am able to search the LDAP Directory, but I have to write the complete Name, i.e. "Miller, John", in the search field. If I try it with "Miller" only, I get no results for my search.
    I played arround with the  <UseWildcards>0</UseWildcards>  tag without any changes in the behaviour.
    Is there anybody who can help?
    Best regards
    Manfred

    Hi Manfred,
    Jabber for Windows has been tested with following directory services:
    Supported Directories
    Microsoft Active Directory  2003
    Microsoft Active Directory  2008
    Cisco Unified Communications Manager User Data Service UDS  is supported on Cisco Unified Communications Manager version 8.6.2 or later.
    OpenLDAP
    The behavior you are seeing could be related to interop issues. I suggest to open a TAC case for further assistance.
    Thanks,
    Maqsood

  • Oracle BI Publisher - Passing multiple wildcard search to a bind variable

    Hi,
    Please help me in resolving the below mentioned issue:
    I have developed a report in oracle BI Publisher with a SQL query.
    While scheduling the report to run I used to pass mutilple parameters like CGAMSVC08,RLCSVC51
    If the pass the parameter with wildcard search like C% it works.
    When I pass two or more parameter values with wildcard search like C%,R% its not working.
    Could you please let me know how should I give the bind variable in the SQL query. Currently I'm paramater like the one shown below for passing multiple paramaters:
    Where (',' || :PRMRETRID || ',' like '%,'||RL.RETROFIT_ID|| ',%')
    Edited by: user1101445 on May 23, 2012 2:02 AM

    HI Tyler.
    Well, here's the latest.
    I found this little gem in the BIEE 10.1.3.3.3 Release Notes Documentation...
    This issue applies to Versions 10.1.3.3, 10.1.3.3.1, 10.1.3.3.2, and 10.1.3.3.3.
    Reports that use the BI Publisher data template as the data model may fail with the
    following error: "Data not defined."
    This error will occur if you defined a parameter in your data template but you do not
    pass a value to it via the user interface. If you do not specify this parameter in the "Parameters" section of the report definition that you created using the BI Publisher Edit Report interface, then you will receive the error.
    To work around this issue, either define the parameter in the Edit Report interface or remove the parameter from the data template.
    That bit is now working.
    Having set this up and using your guide it works if my SOAP parameters declaration passes a single value like this...
    <parameterNameValues>
    <item>
    <name>P_INVOICE_ID</name>
    <multiValuesAllowed>true</multiValuesAllowed>
    <values>
    <item>16641</item>
    </values>
    </item>
    </parameterNameValues>
    But if I try and pass two or more like this...
    <parameterNameValues>
    <item>
    <name>P_INVOICE_ID</name>
    <multiValuesAllowed>true</multiValuesAllowed>
    <values>
    <item>16641,18421</item>
    </values>
    </item>
    </parameterNameValues>
    BIP states "java.sql.SQLException: ORA-01722: invalid number"
    My SQL where clause is..
    <sqlStatement name="Q1">
    <![CDATA[select * from vw_invoice_summary
                   where invoice_summary_id IN (:P_INVOICE_ID)]]>
    </sqlStatement>
    And the BIP error records the parameter value as P_INVOICE_ID 16641,18421 (which are legit invoice IDs)
    In summary, works if I pass one invoice ID, fails if I pass two or more.
    Any ideas? Or do you reckon this is now a post for the BIP forum?
    Kind regards.
    Simon

  • Can't perform wildcard searches

    Hello world,
    We're using Portal 3.0.9.8.1 with Patch 1949492 installed. This is on 8.1.7.2.4 SE Database.
    When performing a search, cannot include wildcards. E.g. a search for 'test' returns only the exact word 'test'. It does not return 'testing','tester','test1','detests'.
    This is against what Portal's Own Help file states. Click 'Search Tips' on the 'Advanced Search Page' and you are told the following:
    The % character is interpreted literally, so do not include it as a wildcard. If you enter 100% as your search term, search finds content that contains the text 100%, not 1000 or 10000. Wildcards are automatically added to the beginning and end of your search term, so searching for 100 will automatically return content that contains 1000 and 10000.
    If interMedia is installed and enabled, search automatically uses the stem operator to search for words that have the same linguistic root as the specified word. For example, if you specified the word lift, the search feature will return content that contains the words lift, lifting, lifted, etc.
    Both of these statements are blatantly untrue as it does neither.
    Any thoughts Oracle? Has anyone else managed a wildcard search?
    Frustrated
    Dave

    I've just verified in 3.0.9 and wildcards are applied as specified in the documentation, when Text is not enabled. If your search term is 'test' then the SQL query will have the search term %test%. Literal % signs in your search term are escaped, so that if your search term was test% then the query would be for %test^%% escape ^.
    There are a few things to remember. When searching WITHOUT Intermedia Text enabled the search will only match terms in the title and description of the item.
    When, Intermedia Text is enabled, all of the content will be searched. However, as indicated in the documentation, the stem operator will be used. So if you search for 'test' the query is now a Text contains('$test') type query. The default operator is the '$' stem operator, which match terms that have the same linguistic root. So if your search term is 'test' it should match 'tests' or 'testing' or 'tested'. However, it will not match 'test1'. Please refer to the Intermedia Text documenation for more information on the stem operator and Text searching in general.

  • Wildcard search in OBIEE?

    Hi,
    I have a requirement where user wants to do a wildcard search(in prompt). Is it possible in OBIEE?
    I have a prompt(edit box) where user has to enter a value. After entering the value the report is shown (using guided navigation) if the request returns any value.
    Typing % in the edit box returns all the rows but entering something like xyz% doesnt return any row.
    Please let me know if anyone has any suggession.
    Thanks

    Thank you for suggesting this.
    I tried this solution but am really confused why its not giving any output when I am giving like condition with presentation variable. Whereas if I directly give same value as in presentation
    variable, it returns all matching rows.
    When I saw the SQL generated (by giving presentation variable with like) by OBIEE, it was having "=" instead of "like value%'" whereas by directly giving the value in place of presentation variable, it applies "like 'value%'" only.
    Not sure why its happening, can you also try it once.
    Let me know if anyone has any other suggestion.
    Thanks
    One possible solution :
    - In your prompt set up a presentation variable
    - and in your answer create filter with a like condition, you presentation variable and the % wildcard an the end

  • Wildcard Search in CCW

    Is there a way to do a wildcard search in CCW when querying up a PO#?
    It would be helpful for my customer when querying orders because their PO#'s sometimes include letters at the end of the PO's like "OP" and sometimes they don't.
    For example PO# 4500151514OP maps to SO# 53654560 and comes up in CCW.  But when I try to do a partial search or wildcard search (4500151514 or 4500151514%) in CCW it won't pull up the SO#.
    Please let me know if wildcard searches are possible in CCW or if there was a work-around that could do this.
    Thank you,
    Tom Butalid

    Thank you for suggesting this.
    I tried this solution but am really confused why its not giving any output when I am giving like condition with presentation variable. Whereas if I directly give same value as in presentation
    variable, it returns all matching rows.
    When I saw the SQL generated (by giving presentation variable with like) by OBIEE, it was having "=" instead of "like value%'" whereas by directly giving the value in place of presentation variable, it applies "like 'value%'" only.
    Not sure why its happening, can you also try it once.
    Let me know if anyone has any other suggestion.
    Thanks
    One possible solution :
    - In your prompt set up a presentation variable
    - and in your answer create filter with a like condition, you presentation variable and the % wildcard an the end

  • What is the different between Sharepoint fast search service and Sql server fulltext search?

    HI ,
    I want to kow what is the different between Sharepoint fast search service and Sql server fulltext search?
    Or Can I abstract the Sharepoint fast search from the Sharepoint platform as a isolate component?
    Thank you.
    James

    They are very, very different beasts.
    Firstly FAST Search for SharePoint is the old name for the product and is only relevant for SharePoint 2010 not 2013. It got merged into the standard SharePoint search for the 2013 release.
    SharePoint search is aimed at providing a Bing or Google like experience for your intranet content, as well as providing some nifty features that are purely SharePoint releated along the way. That means it can crawl SharePoint content, file shares,
    outlook mailboxes, internal and external websites and probably fifty other different things if you really tried. Whilst i'm not an expert on SQL full text search I believe it's intended to provide a search feature for content held within SQL databases
    and tables.
    Can you run SharePoint purely for Search? Yes, definitely.

Maybe you are looking for

  • Error while starting manages server

    Hi All. M facing problem while starting managed server, this might be related to sip server as i see this in the error log. when i click on the sip server tab in the console then io see below error :- +++++++++ Error opening /ext-jsp/sipserver/Config

  • How to Display the content of Excel file into Webdynpro Table

    Hi Experts I am following the Blog to upload a file in to the webdynpro context,but my problem is after uploading a excel file i need to extract the content from that Excel file and that content should be displayed in the webdynpro table.Can any body

  • TS1702 How / where can I find doodle fill for my iPad?

    Where or how can I download the doodle fill app for ipad

  • Student with maximun calsses

    I have a question, can you guys plz look into this. Two tables student and class. I want to pull the data for the student with maximum number of classes I am using select student_name, count(*) from student, class group by student_name The above quer

  • Sigma button in ALV

    Hi Senior ABAP folks,                            how to bring sigma button in the ALV list . Except that button i have all button default in the ALV grid. And please let me know howto enable the save button . Regards, Jagadish .