How to search for data in active directory

if i have an administrator priviledge, how can i search for user's data if i know his username from active directory.

What form do you have the user's name in ?
ANTIPODES\alberteString searchFilter = "(&(objectClass=user)(samAccountName=alberte))";[email protected] searchFilter = "(&(objectClass=user)(userPrincipalName=[email protected]))";Albert EinsteinString searchFilter = (&(objectClass=user)(givenName=Albert)(sn=Einstein))";or using Ambiguous Name Resolution (anr)String searchFilter = "(&(objectClass=user)(anr=Albert Einstein))";or it's even clever enough to useString searchFilter = "(&(objectClass=user)(anr=Einstein Albert))";

Similar Messages

  • How to save HR data in Active Directory using ABAP i.e thru LDAP Connector

    Hi All,
           Can any one please help me out how
           to save HR data in Active directory
           using LDAP Connector ?             
           Please help ASAP as it is very urgent .
    Thanks
    Jitendra

    There are 100 of such scripts are there online.
    here are few tips and codes. you will get more.  
    https://gallery.technet.microsoft.com/scriptcenter/Feeding-data-to-Active-0227d15c
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/31/use-powershell-to-modify-existing-user-accounts-in-active-directory.aspx
    http://powershell.org/wp/forums/topic/ad-import-csv-update-attributes-script/
    Please mark this as answer if it helps

  • How to save hr data in Active directory  using abap

    Hi all
    can any one please help me out how to save hr data in Active directory using LDAP connector
    please help as this is very urgent requirement
    thanks in advance
    Thanks
    Chanti

    What form do you have the user's name in ?
    ANTIPODES\alberteString searchFilter = "(&(objectClass=user)(samAccountName=alberte))";[email protected] searchFilter = "(&(objectClass=user)(userPrincipalName=[email protected]))";Albert EinsteinString searchFilter = (&(objectClass=user)(givenName=Albert)(sn=Einstein))";or using Ambiguous Name Resolution (anr)String searchFilter = "(&(objectClass=user)(anr=Albert Einstein))";or it's even clever enough to useString searchFilter = "(&(objectClass=user)(anr=Einstein Albert))";

  • How to search for data on the web and return to jsp

    I need to collect data from a web site and return that data to my jsp file. The page should consist of a web page in which the user search for available flights then I conect to easyjet automatically fill in the form and return the result from easyjet.com to my jsp file..Do anyone know how can I do this?? I need to use java for this and not cgi..I found also some JavaScripts that can perform the same thing..Thanks...

    Hi,
    are you able to change dynamically the  operation.url = "assets/data/shopping.xml";?
    i need to do that based on the users input.
    Thanks in advance,

  • How to search for file in a directory or subdirectories?

    I need ur help urgently. I'm currently doing a java project in which the program should be able to do file searching.
    For eg. if I key in a.jpg, it should display C:\pictures\a.jpg (a.jpg is stored in a folder called "pictures")
    But the problem is that my program is only able to search in the C drive only.
    If I move the file into a folder in the C drive, my program cannot detect this.
    Can you help me to solve this problem? I'm really looking forward for your reply.
    Thanks. Here are the codes.
    import java.io.*;
    import java.awt.*;
    class FindFile
         public static void main(String args[]) throws IOException
              //reads the user input
              BufferedReader userInput;
              while(true)
                        userInput = new BufferedReader(new InputStreamReader(System.in));
                        String s = userInput.readLine();
                        //quits the system               
                        if(s.equals("/quit"))
                             System.exit(0);
                        //if user does not key in anything, prompt msg appear
                        else if(s.equals(""))
                             System.out.println("Command Syntax: java ListFiles <filename>");
                             System.out.println("<filename> - The full name of a file and extension (i.e., test.txt)");
                        else if(userInput != null)
                             String t = "c:";
                             File f = new File(t);
                             String[] files = f.list();
                             char[] qwet;
                             boolean test = false;
                             //check for the file name and compare with the user input
                             for (int i = 0; i < files.length; i++)
                                  if(files.equals(s))
                                       System.out.println("");
                                       System.out.println("File Found");
                                       System.out.print("The File Found at This Path: ");
                                       //display the path
                                       System.out.print(f.getAbsolutePath());
                                       System.out.println(files[i]);
                                       test = true;
                                       break;
                             //if file does not exist
                             if(test == false)
                                  System.out.println("File Not Found");

    well, i think the best solution would be make a recursive search through the directory tree. I don't know if you are familiar to this, but the functions that searches for the file would look like this:
    public String searchFile(String name) {
      File[] roots = File.listRoots();   // List all file roots (in windows the different units, c:, d:, etc.)
      for (int i = 0 ; i < roots.length() ; i++) {
        String aux = recursiveSearch(roots, name);
    if (aux != null) {   // If the "recursiveSearch" returns something different than null is that the file is founded, so we return the path.
    return aux;
    return null; // If we get there nothing has been found
    private String recursiveSearch(File f, String name) {   // f is the directory to search for the file with name "name"
    File[] childs = f.listFiles();
    for (int i = 0 ;i < childs.length ; i++) {
    if (childs[i].isDirectory()) {  // If that is a directory we search inside
    String aux = recursiveSearch(childs[i], name);
    if (aux != null) {   // We have found it inside this directory
    return aux;
    } else {  // Is a regular file
    if (name.compareTo(childs[i].getName()) == 0) {   // If the file is what we want we return his path
    return childs[i].getCanonicalPath();
    // If we get here is because the file is not inside the directory or any subdirectory on it
    return null;
    You should just call the function searchFile(name) with the name of the file you want to search. If it finds one with this name it will return his absolute path, and if he doesn't the desired file he will return null.
    If you don't understand anything just ask.
    (Note: i have not tested this code, so can be some mistakes, but it think it is almost correct. mmmhh don't now why, but [ & ] appear in my code as < & >. Just replace them.).
    Hope that helps.
    Zerjio

  • How to search for Data elements...

    Hai friends,
         I have the 'short descriptions' of some fields and I need data elements relating to those short descriptions.
         I searched using se12 transaction. But the result is not upto the mark. Is there any other way of searching..? If yes, please tell me.
                         Thank You

    Hi,
      Go to Tcode se15 and expand ABAP Dictionary and then double click Data Elements, on the right hand side you will get Standard Selections, give ur description there and then press enter...
    hope this will give you solution.
    Regards,
    Ramesh.

  • How do I get info from Active Directory and use it in my web-applications?

    I borrowed a nice piece of code for JNDI hits against Active Directory from this website: http://www.sbfsbo.com/mike/JndiTutorial/
    I have altered it and am trying to use it to retrieve info from our Active Directory Server.
    I altered it to point to my domain, and I want to retrieve a person's full name(CN), e-mail address and their work location.
    I've looked at lots of examples, I've tried lots of things, but I'm really missing something. I'm new to Java, new to JNDI, new to LDAP, new to AD and new to Tomcat. Any help would be so appreciated.
    Thanks,
    To show you the code, and the error message, I've changed the actual names I used for connection.
    What am I not coding right? I get an error message like this:
    javax.naming.NameNotFoundException[LDAP error code 32 - 0000208D: nameErr DSID:03101c9 problem 2001 (no Object), data 0,best match of DC=mycomp, DC=isd, remaining name dc=mycomp, dc=isd
    [code]
    import java.util.Hashtable;
    import java.util.Enumeration;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class JNDISearch2 {
    // initial context implementation
    public static String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory";
    public static String MY_HOST = "ldap://99.999.9.9:389/dc=mycomp,dc=isd";
    public static String MGR_DN = "CN=connectionID,OU=CO,dc=mycomp,dc=isd";
    public static String MGR_PW = "connectionPassword";
    public static String MY_SEARCHBASE = "dc=mycomp,dc=isd";
    public static String MY_FILTER =
    "(&(objectClass=user)(sAMAccountName=usersignonname))";
    // Specify which attributes we are looking for
    public static String MY_ATTRS[] =
    { "cn", "telephoneNumber", "postalAddress", "mail" };
    public static void main(String args[]) {
    try { //----------------------------------------------------------        
    // Binding
    // Hashtable for environmental information
    Hashtable env = new Hashtable();
    // Specify which class to use for our JNDI Provider
    env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
    // Specify the host and port to use for directory service
    env.put(Context.PROVIDER_URL, MY_HOST);
    // Security Information
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, MGR_DN);
    env.put(Context.SECURITY_CREDENTIALS, MGR_PW);
    // Get a reference toa directory context
    DirContext ctx = new InitialDirContext(env);
    // Begin search
    // Specify the scope of the search
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    // Perform the actual search
    // We give it a searchbase, a filter and the constraints
    // containing the scope of the search
    NamingEnumeration results = ctx.search(MY_SEARCHBASE, MY_FILTER, constraints);
    // Now step through the search results
    while (results != null && results.hasMore()) {
    SearchResult sr = (SearchResult) results.next();
    String dn = sr.getName() + ", " + MY_SEARCHBASE;
    System.out.println("Distinguished Name is " + dn);
    // Code for displaying attribute list
    Attributes ar = ctx.getAttributes(dn, MY_ATTRS);
    if (ar == null)
    // Has no attributes
    System.out.println("Entry " + dn);
    System.out.println(" has none of the specified attributes\n");
    else // Has some attributes
    // Determine the attributes in this record.
    for (int i = 0; i < MY_ATTRS.length; i++) {
    Attribute attr = ar.get(MY_ATTRS);
    if (attr != null) {
    System.out.println(MY_ATTRS[i] + ":");
    // Gather all values for the specified attribute.
    for (Enumeration vals = attr.getAll(); vals.hasMoreElements();) {
    System.out.println("\t" + vals.nextElement());
    // System.out.println ("\n");
    // End search
    } // end try
    catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    My JNDIRealm in Tomcat which actually does the initial authentication looks like this:(again, for security purposes, I've changed the access names and passwords, etc.)
    <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
    connectionURL="ldap://99.999.9.9:389"
    connectionName="CN=connectionId,OU=CO,dc=mycomp,dc=isd"
    connectionPassword="connectionPassword"
    referrals="follow"
    userBase="dc=mycomp,dc=isd"
    userSearch="(&(sAMAccountName={0})(objectClass=user))"
    userSubtree="true"
    roleBase="dc=mycomp, dc=isd"
    roleSearch="(uniqueMember={0})"
    rolename="cn"
    />
    I'd be so grateful for any help.
    Any suggestions about using the data from Active directory in web-application.
    Thanks.
    R.Vaughn

    By this time you probably have already solved this, but I think the problem is that the Search Base is relative to the attachment point specified with the PROVIDER_URL. Since you already specified "DC=mycomp,DC=isd" in that location, you merely want to set the search base to "". The error message is trying to tell you that it could only find half of the "DC=mycomp, DC=isd, DC=mycomp, DC=isd" that you specified for the search base.
    Hope that helps someone.
    Ken Gartner
    Quadrasis, Inc (We Unify Security, www -dot- quadrasis -dot- com)

  • How to search for files using wildcards * and ?.

    Hi All,
    I've been searching the forum for a couple of hours now and have been unable to find a good example of how to search a directory (Windows OS) for a file using wildcards * and/or ?. Does anyone out there have a good example that they can share with me?
    Thanks

    Hi All,
    First of all I want to thank everyone for taking the time to respond to my question. All of your responses where greatly appreciated.
    I took the example code that was posted by rkconner, thanks rkconner, and modified it to allow me to search for files in a directory that contain * and/or ?. Yes, I said and/or! Meaning that you can use them both in the same file name, example: r??d*.t* would find readme.txt.
    I've posed my complete and thoroughly document code below. I hope it is very helpful to other as I have searched many forums and spent many hours today trying to resolve this problem.
    Enjoy
    * File Name: WildcardSearch.java
    * Date: Jan 9, 2004
    * This class will search all files in a directory using the
    * asterisk (*) and/or question mark (?) as wildcards which may be
    * used together in the same file name.  A File [] is returned containing
    * an array of all files found that match the wildcard specifications.
    * Command line example:
    * c:\>java WildcardSearch c:\windows s??t*.ini
    * New sWild: s.{1}.{1}t.*.ini
    * system.ini
    * Command line break down: Java Program = java WildcardSearch
    *                          Search Directory (arg[0]) = C:\Windows
    *                          Files To Search (arg[1]) = s??t*.ini
    * Note:  Some commands will not work from the command line for arg[1]
    *        such as *.*, however, this will work if you if it is passed
    *        within Java (hard coded)
    * @author kmportner
    import java.io.File;
    import java.io.FilenameFilter;
    public class WildcardSearch
         private static String sWild = "";
          * @param args - arg[0] = directory to search, arg[1] = wildcard name
         public static void main(String[] args)
              String sExtDir = args[0]; // directory to search
              sWild = args[1];   // wild card to use - example: s??t*.ini
              sWild = replaceWildcards(sWild);
              System.out.println("New sWild: " + sWild);
              File fileDir = new File(sExtDir);
              File[] arrFile = fileDir.listFiles(new FilenameFilter()
                   public boolean accept(File dir, String name)
                        return (name.toLowerCase().matches(sWild));
              for (int i = 0; i < arrFile.length; ++i)
                   System.out.println(arrFile.getName());
         }     // end main
         * Checks for * and ? in the wildcard variable and replaces them correct
         * pattern characters.
         * @param wild - Wildcard name containing * and ?
         * @return - String containing modified wildcard name
         private static String replaceWildcards(String wild)
              StringBuffer buffer = new StringBuffer();
              char [] chars = wild.toCharArray();
              for (int i = 0; i < chars.length; ++i)
                   if (chars[i] == '*')
                        buffer.append(".*");
                   else if (chars[i] == '?')
                        buffer.append(".{1}");
                   else
                        buffer.append(chars[i]);
              return buffer.toString();
         }     // end replaceWildcards method
    }     // end class

  • How to search for a BADI in a transaction

    Hi All,
    Please let me know the steps to find a BADI for a transaction.
    Thanks,
    Jaffer Ali.S

    check this.
    u can find BADI's in different ways...
    1>First go to any transaction->iN THE menu bar SYSTEM->STATUS->Get the program name ->double click->u will go to the program attached to the tcode.Now search term will be CALL CL_EXITHANDLER.Now u will get list of BADI'S available..
    2>Goto SE24->Give class name as CL_EXITHANDLER->Display->double click on get_instance mathod->Now u will go inside the method->Now put break point on the cl_exithandler.Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..
    There are multiple ways of searching for BADI.
    • Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
    • Finding BADI Using SQL Trace (TCODE-ST05).
    • Finding BADI Using Repository Information System (TCODE- SE84).
    1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for ‘CL_EXITHANDLER=>GET_INSTANCE’.
    Make sure the radio button “In main program” is checked. A list of all the programs with call to the BADI’s will be listed.
    The export parameter ‘EXIT_NAME’ for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter ‘INSTANCE’ will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
    2. Start transaction ST05 (Performance Analysis).
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    3. Go to “Maintain Transaction” (TCODE- SE93).
    Enter the Transaction VD02 for which you want to find BADI.
    Click on the Display push buttons.
    Get the Package Name. (Package VS in this case)
    Go to TCode: SE84->Enhancements->Business Add-inns->Definition
    Enter the Package Name and Execute.
    Here you get a list of all the Enhancement BADI’s for the given package MB.
    The simplese way for finding BADI is
    1. chooes Tcode Program & package for that Tcode.
    2. Go to Tcode se18
    3. Press F4
    4. search by package or by program.
    Regards
    Kiran Sure

  • How to search for a badi

    how to search for a badi
    srinivas.

    Hi Srinivas,
    Good
    Check this link
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    Run this program
    *& Report ZNEGI16 *
    REPORT ZNEGI16 .
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.
    Solution 2
    1.Get the Package of the program name of the transaction.
    2.Go to Transaction SE18.
    3.Press F4 on the badi definition name.
    4.Click the information systems button.
    5.Give the Package name and press enter.
    6.Select the BADI that is relevant to the application.
    Good Luck and thanks
    AK

  • How to search for perticular substring in given string.

    Hi, Can any one tell me how to search for perticular substring in given string.
    example:
    I have to search for CA in given Order type it may be CA10 or CA15. Please Do the needful.

    Hi Aniruddha,
    check this...
    Data var string,
    var = 'India'.
    search var for 'Ind'.
    if sy-subrc = 0.    " var having ind
    Message 'Ind found' type 'I'.
    else  .            "var not having ind
    Message 'Ind not Found' type 'I'.
    endif.
    thanx
    bgan.

  • Please answer. how to search for files

    Hi,
    We need an integration with SAP. They send us files in the format: yyyymmddhhmiss.atv
    For example we receive following files:
    20050503101115.atv
    20050504101115.atv
    20050505101115.atv
    So, we dont know how to search for all files with extensions ".atv" in the directory.
    We are using PLSQL. Is there some way to resolve with UTL_FILE?
    Any other suggestion?

    A possibility:
    In sqlplus, issue a HOST command to list the files to a file:
    ls *.atv &gt; atv_dir.txt
    Then use utl_file to read atv_dir.txt and parse it for the file names.
    You could put the filenames in a pl/sql table and use that as loop control.

  • UCCE Pulling Data from Active Directory

    Greetings,
    Is it possible to pull data from Active Directory using caller ANI, and then pass first name, last name, etc... to Finesse through call variables?
    This is for an IT support line of business where callers are internal.
    Either through ICM or CVP Studio application?
    Thanks a lot,
    Mike

    You can write custom element in CVP, A Java class (Standard Action Element) which will connect to your Active Director using standard LDAP protocol and query information based on telephone number.
    then put the data in some variable and pass it back to ICM.
    look at this : http://docs.oracle.com/javase/tutorial/jndi/ops/index.html
    Regards
    Chintan

  • How to search BETWEEN Dates

    I'm on 9i.
    I have the following query which will not work. I need to search for data between the time range I have in the WHERE Clause below.
    SELECT *
    FROM SYS.AUD$
    WHERE TIMESTAMP# BETWEEN '23-Jul-07 06:55:00 PM' AND '23-Jul-07 07:30:00 PM'
    ORDER BY 4 DESC
    The data in the TIMESTAMP# Column looks like this;
    23-Jul-07 06:55:00 PM
    The TIMESTAMP# Column is a DATE DataType.
    How do I get my query to work? I thought that because it is a DATE DataType, I wouldn't need to perform any sort of conversion such as TO_DATE()

    @stelliosk
    The top of your post was spot on.
    However...
    Be careful converting a date to a string for comparison. Strings have an entirely different way of evaluating comparison operators.
    SELECT  1
    FROM   DUAL
    WHERE
      TO_DATE('12-01-06', 'MM-DD-RR') < TO_DATE('11-01-07', 'MM-DD-RR');
    1                     
    1                     
    1 rows selected
    SELECT  1
    FROM   DUAL
    WHERE
      '12-01-06' < '11-01-07';
    1                     
    0 rows selected
    SELECT  1
    FROM   DUAL
    WHERE
      TO_DATE('May 2007', 'Mon YYYY') < TO_DATE('Aug 2007', 'Mon YYYY');
    1                     
    1                     
    1 rows selected
    SELECT  1
    FROM   DUAL
    WHERE
      'May 2007' < 'Aug 2007';
    1                     
    0 rows selected

  • 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

Maybe you are looking for

  • How do you change the pram battery on a slot loading iMac?

    I'm hopeful that a new pram battery will solve the problems I've been having with my iMac. I just have to put it in, and judging by the correspondence I've seen on this subject, that's not an easy job. (One letter spoke of having to remove 16 screws)

  • Dynamic text shifts when style changes

    I have some dynamic text fields that are set up so that when you rollover them (actually a button behind them), their formatting changes. This is done with some basic actionscripting, setting up 2 different text format variables and attaching one or

  • Managing iTunes Library

    I need help to re-arrange the order of the songs listed in my iTunes library. Simple as it sounds I have been unsuccessful and do not know how to arrange my entire list of songs in my whole library sorted by the author. I would be so grateful for som

  • Wishlist for Dreamweaver CS5 (from Adobe Website)  - Don´t let ADDT die.

    Wishlist for Dreamweaver CS5 from adobe site. https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Filter on product search in SAP CRM 2007 User Interface

    Hi Experts, I have the following requirement: we need to have the possibility to filter the Products in the Product search in the user interface based on the User's sales organization. Meaning that, if a user belongs to Sales Organization A, he will