HOW TO SEARCH DATE

HI ALL
I WANT TO SEARCH BY DATE BY PRESSING THE BUTTON
My Button code is Like that
declare
     l_where varchar2(4000);
begin
  if :search_type = 'ALL' then
       l_where := 'ENTER_DATE||REPLY like ''%'|| :serch_value ||'%''' ; 
  else
       l_where := :search_type ||' like ''%'|| :serch_value ||'%''';
   end if;
    set_block_property('ALARM',default_WHERE,l_where);
       go_block('ALARM');
      execute_query;
end;
and My table is Like that
SQL> desc alarm
Name                                      Null?    Type
QUESTION_UK                                        VARCHAR2(500)
REPLY_UK                                           VARCHAR2(500)
ENTER_DATE                                         TIMESTAMP(6)
REPLY                                              VARCHAR2(20)i have a filed where i put the value either reply or enter_date but when i put the value of rply it works
but when i enter the date it did't work
Thanks ANd Regards
Vikas Singhal
Edited by: vikas singhal on Jul 28, 2009 5:29 PM
Edited by: vikas singhal on Jul 28, 2009 5:30 PM
Edited by: vikas singhal on Jul 28, 2009 5:31 PM

1. You should explicitly convert your date to a char, if you really want to do a string-comparison:
l_where := 'TO_CHAR(ENTER_DATE, ''DD.MM.YYYY'') ||REPLY like ''%'|| :serch_value ||'%''' ;  but be aware that you loose any index on one hand, and the search-result depends on how the users his search-condition on the other hand.
2. I would go with two separate search-fields, then you can do a "clear" date-comparison
3. You talked about DATE-fields by now, why do you use a TIMESTAMP-datatype in your table then?

Similar Messages

  • How to search data from a context node.

    Hi Friends,
    Thanks for ur help for previous problem . I am facing some other problem i.e how to
    search data from a context node.
    i have a context node :-
    Car(main node) which consist of details, owners, engine and Brand  as its sub node.
    the value attibutes of difft nodes are:-
    Car-  category
    Details-  Mileage, Price, registration_no, miles_used
    owner -  name, phnno,addrs
    Brand -  main_brand, co_brand
    Engine- Bhp,Rpm
    Now i have to apply a search criteria on the basis of price, miles_used .
    pls help to implement that .
    Thanks & regards
    Pravin jha

    Hi PRAVIN,
                       What I can understand from your problem is that, you have a list with various properties and you want to display them and search them in your WD App. If I am correct, use the following approach:
    Instead of using "details, owners, engine and Brand" Nodes, use the attributes inside the parent node. i.e in the node Car, add all the attributes viz. Mileage, Price, registration_no, miles_used, name, phnno,addr etc.
    Now you can create a table of this node "Car" and can easily search on the basis of any criteria.
    I hope this solves your issue. If you are looking for something else, please revert, I'll be happy to help you.
    Cheers!!!
    Umang

  • How to search data with multiple parameters =SESSION

    Dear Günter Schenk
    Please help
    I have two Tables with many fields
    1.       tbl_users
    2.       tbl_transection
    Now problem is that I want when user login he make search in " tbl_usr_transection " related its own Transactions other then he view all user data
    I have one column about user in transaction table i.e. "fld_transection_by"
    I am using SESSION to filter all transaction its related user and its working fine.
    <?php echo $_SESSION['login_id']; ?>=<?php echo $row_rstbl_transections[' fld_transection_by ']; ?>
    Now how to make search from filter rows in many field
    Please explain in detail
    Thanks in Advance

    Hi, It sounds like you need to carry those variables into your mySQL statement.

  • How to search data in database which is in mixedcase

    Hi,
    I have to fetch data from database based on parameter value. The data stored in database is in mixed case. but while passing the  parameter its converting it into uppercase. so the database search fails.
    E.g Suppose the name in database is 'SANdeep'. On running the program when i pass the value as 'SANdeep' its converting it into "SANDEEP' and searches in the database. But my requirement is it should search as i entered i.e. 'SANdeep' because the data stored in the database is 'SANdeep'.
    How to do it.

    Hi sandeeo,
    declare your parameter with Lower case addtion.
    parameters p_name like ztab-name lower case.
    This way, the system will not convert the parameter into upper case.
    Regards,
    Ravi

  • How to search data

    I am tring to write a application for search engine. I want when I give a website address and a keyword. I may get the places of occurences anywhere in the website , displayed as a hyperlink.
    But I don know from where I have to start. Can anyone give me a hint how to do this.

    Actually I have worked now for abt 4 months in java application. And main motive was not to have something as Google but I have own website and just want to have a simulation.
    And out in this forums I hope I can have it done using someone's guidance.
    I don want to search the world wide web but my website that's all.

  • How to search data dictionary for interval partitions?

    Oracle 11.2.0.3
    When I query DBA_PART_TABLES.PARTITIONING_TYPE it says 'range'. I want to be able to differential an interval from other range based partitions in the data dictionary?
    used this example. shows 'range'
    http://www.rittmanmead.com/2008/09/investigating-oracle-11g-interval-partitioning/
    Oracle Docs list 'SYSTEM' as a partitioning_type which I thought would be intervals.
    ALL_PART_TABLES
    [code]
      1   CREATE TABLE interval_sales
      2          ( prod_id        NUMBER(6)
      3          , cust_id        NUMBER
      4          , time_id        DATE
      5          , channel_id     CHAR(1)
      6          , promo_id       NUMBER(6)
      7          , quantity_sold  NUMBER(3)
      8          , amount_sold    NUMBER(10,2)
      9          )
    10       PARTITION BY RANGE (time_id)
    11       INTERVAL(NUMTOYMINTERVAL(1, 'MONTH'))
    12         ( PARTITION p0 VALUES LESS THAN (TO_DATE('1-1-2005', 'DD-MM-YYYY')),
    13           PARTITION p1 VALUES LESS THAN (TO_DATE('1-1-2006', 'DD-MM-YYYY')),
    14           PARTITION p2 VALUES LESS THAN (TO_DATE('1-7-2006', 'DD-MM-YYYY')),
    15*          PARTITION p3 VALUES LESS THAN (TO_DATE('1-1-2007', 'DD-MM-YYYY')) )
    SQL>/
    Table created.
    Elapsed: 00:00:00.01
    SQL> select partitioning_type from user_part_tables where table_name = 'INTERVAL_SALES';
    PARTITION
    RANGE
    [/code]

    CREATE TABLE junk1
       ( id         NUMBER )
       PARTITION BY RANGE (id)
       INTERVAL(5)
         ( PARTITION p0 VALUES LESS THAN (5),
           PARTITION p1 VALUES LESS THAN (10),
           PARTITION p2 VALUES LESS THAN (15),
           PARTITION p3 VALUES LESS THAN (20) )
    CREATE TABLE junk2
       ( id         NUMBER )
       PARTITION BY RANGE (id)
         ( PARTITION p0 VALUES LESS THAN (5),
           PARTITION p1 VALUES LESS THAN (10),
           PARTITION p2 VALUES LESS THAN (15),
           PARTITION p3 VALUES LESS THAN (20) )
    select owner, table_name, partitioning_type, interval
      from dba_part_tables
    where table_name in ('JUNK1', 'JUNK2')
    OWNER                          TABLE_NAME                     PARTITIONING_TYPE INTERVAL           
    GREGS                          JUNK1                          RANGE             5                  
    GREGS                          JUNK2                          RANGE                 
    2 rows selected.

  • How to search a .csv file for data using its timestamp, then import to labview

    Hi, I'm currently obtaining density, viscosity and temperature data from an instrument, adding a timestamp and writing it to a .csv file which I can view in Excel. This works fine (see attached code) but what I need to do now is to search that csv file for data which was obtained at a certain time, import the temperature, density & viscosity values at this time back into Labview to do some calculations with them, while the data acquisition process is still ongoing.
    I've found various examples on how to import an entire csv file into labview, but none on how to extract data at a specific time. Also, whenever I try to do anything with the .csv file while my data acquistion VI is running, I receive error messages (presumably because I'm trying to write to and import data from the .csv file simultaneously). Is there some way around this, maybe using case structures?
    If you need to know my skill level, I've been using Labview for a few weeks and prior to that have basically no experience of writing code, so any help would be great. Thanks!
    Solved!
    Go to Solution.
    Attachments:
    Lemis VDC-30 read registers MODBUS v5.vi ‏56 KB

    It sounds as if you are going about this a little backwards writing to a data file and then extracting from the file but its the weekend so I can't think of an improved way to do it at the moment. 
    Searching for a specific time with those specific values is quite easy, or if you wanted to select any time then you could interpolate the values to find any value that you want (This is where the contiguous measurement comes in, as you have readings at discrete times you will have to interpolate the values if you want to get the 'measured value' at a time point that is not exactly one of your measured points).
    If you can extract the TDMS time column and the T, D & V then simply thresholding and interpolating each of your array/data sets should allow readings at your desired times.
    Attachments:
    Interpolate.png ‏301 KB

  • Need help :: how to search in nested table/varray data type

    I have the following structure...
    CREATE TYPE lang_con AS VARRAY(15) OF VARCHAR2(50);
    CREATE TYPE rel_con AS VARRAY(15) OF VARCHAR2(50);
    CREATE TABLE Country_n(
    "NAME" VARCHAR2(40 BYTE) CONSTRAINT "COUNTRY_NAME_NOTNULL_N" NOT NULL ENABLE,
    "CODE" CHAR(2 BYTE),
    "CAPITAL" VARCHAR2(40 BYTE),
    "PROVINCE" VARCHAR2(40 BYTE),
    "POPULATION" NUMBER,
    "AREA" NUMBER,
    "LANGUAGES" lang_con,
    "RELIGIONS" rel_con
    after inserting data from 3 different table (country, language, religion) the table looks like this....
    Cyprus cy Nicosia Government controlled area 775927 9250 VARCHAR(English,Greek,Turkish) VARCHAR(Greek Orthodox,Muslim)
    Czech Republic cz Prague Prague 10246178 78866 VARCHAR(Czech) VARCHAR(Orthodox,Protestant,Roman Catholic)
    Germany de Berlin Berlin 82424609 357021 VARCHAR(German) VARCHAR(Muslim,Protestant,Roman Catholic)
    Djibouti dj Jibuti Jibuti 466900 23000 VARCHAR(Afar,Arabic,French,Somali) VARCHAR(Christian,Muslim)
    Denmark dk Copenhagen Frederiksberg Kommune 5413392 43094 VARCHAR(Danish,Faroese,German,Greenlandic) VARCHAR(Evangelical Lutheran,Muslim)
    now I want to get the countries in which german language is being spoken. Actually I need to know how to search in this custom data type of mine....I also need to perform other operation further so really need to know how can I search in this custom data type...
    when I execute the following query....
    select * from country_n cn where cn.languages like '%German%' order by name
    I got the following error....
    Error starting at line 1 in command:
    select * from country_n cn where cn.languages like '%German%' order by name
    Error at Command Line:1 Column:33
    Error report:
    SQL Error: ORA-00932: inconsistent datatypes: expected NUMBER got AHMADM.LANG_CON
    00932. 00000 - "inconsistent datatypes: expected %s got %s"
    *Cause:   
    *Action:
    let me know please...looking forward to your replies....
    Thanks,

    Hi,
    Try this:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL>
    SQL> SELECT t1.*
      2    FROM country_n t1,
      3         TABLE(t1.languages) t2
      4   WHERE column_value LIKE '%German%';
    NAME                                     CODE CAPITAL                                  PROVINCE                                 POPULATION       AREA LANGUAGES RELIGIONS
    Germany                                  de   Berlin                                   Berlin                                     82424609     357021 <Object>  <Object>
    SQL> Regards,

  • How do I prevent browsing and search data from being forwarded to Google by Mozilla, while still using Mozilla's Firefox as my default browser?

    I do enjoy using Mozilla's Firefox as my default browser, BUT, I don't enjoy the details of my life, to include my Internet activity, to be archived by Google, or anyone else, via Mozilla's/Firefox's sharing of my Internet browsing and/or search engine activity with any aspect or facet of the Google organization. With all of this said, my question is, "How do I prevent browsing and search data from being forwarded to Google by Mozilla, while still using Mozilla's Firefox as my default browser?"

    Firefox's default behavior includes no automatic interaction with Google.
    We do use Google as default search engine and to report web forgery in the 'help' menu, but no data are sent to Google without your knowledge, and you can change your preferred search engine at will.
    However many websites themselves make use of Google Ads which do cause interaction with Google when you load the webpages. This is visible in status bar and happens in any browser. The [https://addons.mozilla.org/en-US/firefox/addon/noscript NoScript] add-on for Firefox can largely save you from this problem.
    If you see things happening otherwise, please reply with details on what you see.

  • How To Enable Spotlight to search data App?

    Is it possible to enable Spotlight to search data on external app? Example I was install Awesome Note, I want Spotlight to be able search data on Awesome Note. Is it possible? How?

    Hi
    Are you sure that your indexer is finishing without any errors? Check activeindex.hda under \search directory to see what is the variable set for activeindex variable? If Oracle Text is the indexer search enabled then the variable activeindex should either OTS1 or OTS2. If anything else then you have indexer problems that is not indexing documents.
    Check the CS log file to see if indexer errors are shown there. If yes, then put it over here so that we can analyse it.
    Hope it helps
    Thanks
    Srinath

  • How do you change you itunes search data?

    how does one go about changing the keywords for a podcast? our church does one, and we want to put the name in the search data. (we had a second one linked previously, now we need to get our name on the new one)

    You can modify the <itunes:keywords> tag in the XML file. You can use up to 12 keywords. Common usage is usually to put things like misspellings of your podcast name or organization, etc..
    The <itunes:summary> tag, which is used for the description of your podcast on the iTunes podcast directory page, has a limit of 4000 characters, all of which will included in iTunes search index. Good rule of thumb is to create a very robust and accurate description of your podcast, what topics are covered, and what to expect from future episodes. Really spend some time on this...remember that just about everything in the <itunes:summary> tag can be a potential search hit. Put the name of your church, the name of your minister, etc... anything you think will best describe your podcast and who you are and what your podcast is about.
    Erik

  • How to Search for a Date in a string having both characters and date

    Hi ,
      I have a requirement to search DATE in the String having Both Characters and DATE . Please kindly let me know as early as possible.
    Regards
    Anil Kumar K

    Try to use SEARCH command with the pattern, making the pattern as fine as it can, like if you have your date in the format 02/23/2007, you can give
    SEARCH STRING FOR ' //'. (assuming the date has at least a single blank before it)
    WRITE:  SY-SUBRC UNDER 'SY-SUBRC',
    SY-FDPOS UNDER 'SY-FDPOS'.
    SY-FDPOS is set to offset of the string from which you can get the date value
    Refer here
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb33cc358411d1829f0000e829fbfe/frameset.htm
    It would have been better if there is something like UNIX "regular expression" matching in ABAP

  • How to search whether a seat is available or not?

    Hi,
    I am developing a form in admin module for a call centre where there is a requirement to check whether a seat is available or not? The form contains a search window which the user enters the date in Location,catergory,From_date,to_date,time_from,time_to fields.
    For example if he enters time_from as 06:00and time_from as 14:00 .That means the seat is occupied for 8 hours but is available for the remaining 16 hours. So the search result should show this seat also in the availability list. Every seat hava a unique seat_id.
    another situation is a seat can be allocated between 22:00 and 06:00.That means it is crossing the day.That means that means in a day the seat is allocated from 00:00 - 06:00 and 22:00-23:59. How to search for this?
    The seat can be allocated for any number of hours in a day. It can be 2 hours .3 hours or 4 hours....means there is no particular time slot system.
    Can this be done using a sql query or plsql procedure?
    can anybody help me in this regard
    Thanking you,
    Deekshit

    Hi
    U can use the following query in function.
    SELECT CASE dumm
    WHEN 'X'
    THEN 'OK'
    END
    FROM (SELECT NVL (dummy, 'Y') dumm
    FROM DUAL
    WHERE TO_DATE (new_date_entered in varchar format, 'hh24:mi:ss') BETWEEN TO_DATE
    (date_from in varchar format,
    'hh24:mi:ss'
    AND TO_DATE
    (date_to in varchar format,
    'hh24:mi:ss'
    But need to b careful when the dates r changing. U can check dat by comparing time_from nd time_to values...in case of date change time_from value will be greater than time_to value(assumption==> seat can't be blocked for more than 12 hours). U can actually use the same query by reversing the conditions.. hope this will solve the problem
    Message was edited by:
    Arpit

  • How to show data vertical in ALV

    How to show data vertical in ALV?
    such as :
    [http://img402.imageshack.us/img402/9978/20101230215621.png|http://img402.imageshack.us/img402/9978/20101230215621.png]
    Moderator Message: Search for available information. Keywords - Dynamic Internal Table
    Edited by: kishan P on Dec 30, 2010 7:35 PM

    Transpose the contents of your internal table.
    Original:
    A 1 1 1
    B 2 2 2
    Transposed:
    A B
    1 2
    1 2
    1 2

  • How to read data from a router by using labview

    I am a  beginner labview. How to read data from a router by using labview ? 

    What kind of data are you trying to read?
    Does the router behave like a webserver that you log into?  If so, search the forums for threads discussing HTML.

Maybe you are looking for

  • IPod not seen in Windows or iTunes

    Hi! Can you help? I have a click-wheel iPod which my friend has given me (she has gone overseas and updated to a newer model). I can't seem to get the iPod in either Windows or iTunes, and I have tried to follow the instructions on the website, but i

  • Not able to read wsdl file

    Hello, I created a method in AM AMImpl.java class. For that method i created a service interface. In service interface folder i tested web service serviceImpl.java file. But it is unable to read the wsdl document. This might be the reason why i am un

  • Help! Acrobat XI Pro for MAC doesn't see my HP 4780 scanner.

    I know the scanner part of my HP C4780 works, both with Windows Acrobat 9 Pro and with all the other scanning functions on the Macbook Pro. I don't know what to do. This is one of the major functions I use Acrobat for, and now I can't get it to work.

  • I need a qualifying copy of iWeb

    help me  please send me a qualifying copy of iWeb

  • XQuery in XSL

    Hi, I am using 11g. I need to perform complex transformation logic on my incoming message to transform it to outgoing message. I have been trying to do this via the XSL mapper without success. I was reading about Xquery and I have the following quest