How to use to_date for this case?

Hi,
I bind parameters in java code.
The param type in java is Timestamp and the data type in table is date.
Here is the sql section printted in log:
2004-08-01 10:00:00.0 <= table.datetime
Why there is a ".0" after second?
And how to use to_date to convert "2004-08-01 10:00:00.0"?
Thanks!

Hi,
Here are a few possibilities
SQL> select cast(timestamp '2004-08-01 10:00:00.0' as date) from dual;
CAST(TIMESTAMP'2004
2004-08-01 10:00:00
SQL> select to_date('2004-08-01 10:00:00.0','YYYY-MM-DD HH24:MI:SS".0"') from dual;
TO_DATE('2004-08-01
2004-08-01 10:00:00
SQL> select to_date(substr('2004-08-01 10:00:00.0',1,19), 'YYYY-MM-DD HH24:MI:SS') from dual;
TO_DATE(SUBSTR('200
2004-08-01 10:00:00

Similar Messages

  • How to use decode for this

    Hi All
    I have one table called agreementproductkey and some columns namely Agreementproductid, keytext, fliename etc.
    There is some condition if agreement product id in not null and keytext field and fileaname field is null then i need to display the value as "NO FILE"
    This what i tried
    select decode(keytext || ' | ' || filename,null,'No File',keytext || filename) display_value, id return_value
    from agreementproductkey
    where agreementproductid = 3173
    But i didnt get the NO FILE when key text field and filename field is null for this agreementproductid.
    Thanks & Regards
    Srikkanth.M

    Hi Srikkanth,
    In the decode part, you have concatenated keytext and filename using '|' due to which it will never evaluate to null, and hence 'NOFILE' will never be displayed. CASE is a better option instead of DECODE.
    SQL> CREATE TABLE t (agreementid NUMBER, keytext VARCHAR2(10), filename VARCHAR2(10));
    Table created
    SQL> INSERT INTO t VALUES (123, 'ABC', 'ABCFile');
    1 row inserted
    SQL> INSERT INTO t VALUES (123, NULL, 'XYZFile');
    1 row inserted
    SQL> INSERT INTO t VALUES (123, 'PQR', NULL);
    1 row inserted
    SQL> INSERT INTO t VALUES (123, NULL, NULL);
    1 row inserted
    SQL> SELECT agreementid, keytext, filename,
      2         DECODE(agreementid, NULL, 'AGREEMENT NULL', DECODE(keytext || filename, NULL, 'NO FILE', 'FILE PRESENT'))
      3    FROM t;
    AGREEMENTID KEYTEXT    FILENAME   DECODE(AGREEMENTID,NULL,'AGREE
            123 ABC        ABCFile    FILE PRESENT
            123            XYZFile    FILE PRESENT
            123 PQR                   FILE PRESENT
            123                       NO FILE
    SQL> Regards
    Ameya

  • How to use REGEXP_REPLACE for this scenario?

    Oracle 10G Enterprise edition
    Hi all,
    Is it possible to use REGEXP_REPLACE for multiple replaces for the give text?
    For eg.
    select replace(replace('My oracle','o','O'),'M','m') from dual
    my Oracle
    Can we do this in a single regular expresion replace or suggest me any ideas?
    Thanks all
    R

    This could be a solution
    Processing ...
    select s as string
    from (
              with reps as (
                   select 'aaa' as src, 'AAA' as dst from dual
                   union all
                   select 'bbb' as src, 'BBB' as dst from dual
              ), strings as (
                   select ' bbb a sample string aaa' as string from dual
              select *
              from reps
                   cross join strings
              model
                   partition by ( string )
                   dimension by (row_number() over(partition by string order by src ) idx)
                   measures (string as s,src,dst)
                   rules (
                        s[any] order by idx desc = replace(presentv(s[cv()+1],s[cv()+1],s[cv()]),src[cv()],dst[cv()])
    where idx = 1
    Query finished, retrieving results...
             STRING         
    BBB a sample string AAA Bye Alessandro

  • How to use LIKE in this CASE?

    There are multiple values that start with "Aerospace".  All of them are going to be set to the same value.  I'm trying to write a Case Statement that will replace all of them with the new value, but i can't get the LIKE to work correctly.
      This can probably be done with REPLACE, but It's bugging me that I can't get the LIKE to work.  
    I've tried a few variations, but compiler hasn't like any of them.  I'm hoping to have one line of code that will work for all of the possible choices.
    What is the best way to use a LIKE or similar thing (such as CONTAINS) to set all of the fields with "Aerospace" at the beginning?
    Sorry for the small font above.  I didn't see how to change it.
    'New Sector Focus' = CASE sectorfocus
    WHEN sectorfocus LIKE 'Aerospace%' THEN '201010 - Aerospace & Defense'
    ELSE sectorfocus
    END

    CASE expression looks good. CASE blog: 
    http://www.sqlusa.com/bestpractices/training/scripts/casefunction/
    >Sorry for the small font above.  I didn't see how to change it.
    Use the HTML icon to edit the html code.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to ''give'' error for this case of an EXTERNAL TABLE?

    Our external table routine works fine:
    -- We have a csv file with 2 cols.
    -- When we create the table referring the csv it works fine.
    -- Even if the csv has more the 2 cols, the ET command only takes the 2 cols and it works fine.
    -- Now, users are saying that if the csv has more than 2 cols, the ET command should give an error
    I went through the command but cannot find any clause which will do this.
    Is there any other way or workaround?
    CREATE TABLE <table_name> (
    <column_definitions>)
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY <oracle_directory_object_name>
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline
    BADFILE <file_name>
    DISCARDFILE <file_name>
    LOGFILE <file_name>
    [READSIZE <bytes>]
    [SKIP <number_of_rows>
    FIELDS TERMINATED BY '<terminator>'
    REJECT ROWS WITH ALL NULL FIELDS
    MISSING FIELD VALUES ARE NULL
    (<column_name_list>))\
    LOCATION ('<file_name>'))
    [PARALLEL]
    REJECT LIMIT <UNLIMITED | integer>;
    Is it possible to use the READSIZE?
    Edited by: Channa on Sep 23, 2010 2:28 AM

    -- Now, users are saying that if the csv has more than 2 cols, the ET command should give an error
    I went through the command but cannot find any clause which will do this.
    Is there any other way or workaround?I looked at Serverprocess' sql*loader script and did not see how that would answer your question - how to raise an error if the file has more than 2 columns. If I missed something can Serverprocess explain?
    I can't think of a direct way to do this with your external table either, but there may be indirect ways. Some brainstorming ideas of perhaps dubious usefulness follow.
    Placing a view over the external table can limit results to the first two columns but won't raise an error.
    A pipelined function can read the external table, check for data where there shouldn't be any, and raise an exception when you find data in columns where there should not be any.
    Similarly, you could ditch the external table and use utl_file to read the file, manually parsing and checking the data. LOTS more work but more control on your end. External tables are much easer to use :(
    Or, first load the external table into a work table before the "real" select. Check the work table for the offending data programatically and raise an error if data is where it should not be. You could keep the existing external table and not have to do a lot of recoding.
    Or, also load the data into an otherwise unneeded global temporary table first. Use a trigger on the load to look for the unwanted data and raise an error if offending data is there
    These ideas are boiling down to variations on validating the data before you use it.
    Good luck!

  • How to use counter in this case

    in my selection screen i have billing doc no-vbeln.
    in my ztable i have etimes a field.
    when i enter a bill doc no and press f8, my etimes feild in ztable sets to 1.
    my requirement is if i enter a bill doc as 97600654 for first time, etimes is 1.
    for second time if i enter that same bill doc i.e 97600654 , etimes should be 2 and if third then 3 and so on.
    if a new doc is entered then etimes is again 1.
    how to code this..plz provide some code.

    Hi Rudra,
    First You need to create a Ztable(say ZTT_VBELN_COUNT) with Three fields MANDT VBELN ETIMES.
    Now in your program add code as below;
    DATA wa_vbeln_count type line of ZTT_VBELN_COUNT.
    SELECT SINGLE * FROM ZTT_VBELN_COUNT INTO CORESSPONDING FIELDS OF wa_vbeln_count where VBELN = lv_vbeln.
    IF SY-SUBRC EQ 0.
       wa_vbeln_count-etimes = wa_vbeln_count-etimes + 1.
    ELSE
       wa_vbeln_count-vbeln = lv_vbeln.
       wa_vbeln_count-etimes = 1.
    ENDIF.
    MODIFY ZTT_VBELN_COUNT FROM wa_vbeln_count.
    Regards
    Karthik D

  • How to use recursive in this case?

    I have a tree showed in bweb rowser UI like this
    +- node1          
    | |
    | +- node_value1a    X 
    | +- node_value1b     
    | +- node_value1c      X
    |
    +- node2    X      
    | |
    | +- node2a      X
    | | |
    | | +- node_value2a1   X
    | | +- node_value2a2   X
    | |
    | +- node_value2b     X  
    |
    +- node3          
    |
    +- node_value3a    X 
    +- node_value3b     
    At the begining I will retrieve the user permission for each node value and show them as checked "X" , Each node have a biding userObject with property key and check status and other more(we will focus on node key name and check status only). The parent node will be calculated as checked only if all its children are checked. So every time user click one node or node value(node without children). I will re-calculate the all tree nodes status based on all node_value again and update all check box in UI page. This seems need to go from bottum up since I will do:
    . Upon the clicking of one node(can be any node) I will send a http request back to server with that node key name. I will then do the following:
    if it is uncheck requrest -> updated all its childrens as unchecked -> recalculate all its parent to update their check status to unchecked
    if it is check requrest -> updated all its children as checked -> recalculate all its parent to update their check status.(may be check or uncheck depend on other sibling node status).
    The porpuse is to update that user's access right.
    I get lost when I try coding this feature. Could sonebody here help me out ? Thanks

    So how far have you got so far?

  • How to use MERGE for this scenario?

    I am using oracle 10G and i need a help on using MERGE statement based on a condition.
    I have no values in table test_tab. So the below MERGE should insert the value, but it is not inserting the record. Please corret me if anything wrong with the below Query.
    MERGE INTO test_tab t
       USING (SELECT NO
                FROM test_tab) s
       ON (s.NO = 1)
       WHEN MATCHED THEN
          UPDATE
             SET t.str = 'EXIST'
       WHEN NOT MATCHED THEN
          INSERT (t.NO, t.str)
          VALUES (1, 'NOT_EXIST');

    MERGE INTO test_tab t
       USING  test_tab s
       on (t.no = 1 )
       WHEN MATCHED THEN
          UPDATE
             SET t.str = 'EXIST'
       WHEN NOT MATCHED THEN
          INSERT (t.NO, t.str)
          VALUES (1, 'NOT_EXIST');

  • How to use parathesis for OR and AND OPERATOR...

    oracle 10g
    Hi
    Guys please help how to use parathesis for this below query its giving same output values for all my similar queries
    select count(balance) from balanace_tb
    where kk_code in(111,112,113)
    or
    kk_code in(111,1124,115,116) and sec_id in(50,51,52,53)
    or
    kk_code in(100,164,215,161) and sec_id in(53,51,52,59)
    or
    kk_code not in(100,164,215,162,134) and sec_id in(53,51,52,59)
    or
    kk_code in(100,164,215,16) and sec_id in(53,51,52,59)
    and
    open_date=20130331

    I assume you're looking for something like this?
    select count(balance) from balanace_tb
    where (   kk_code in(111,112,113)
           or (kk_code in(111,1124,115,116) and sec_id in(50,51,52,53))
           or (kk_code in(100,164,215,161) and sec_id in(53,51,52,59))
           or (kk_code not in(100,164,215,162,134) and sec_id in(53,51,52,59))
           or (kk_code in(100,164,215,16) and sec_id in(53,51,52,59))
    and open_date=20130331
    If not, please post some example data, the expected output from that data, and the logic you are expecting to use, as well as posting your database version.
    Re: 2. How do I ask a question on the forums?

  • How to use i for if condition in a for i in loop?

    Hi friends,
    I have a question on how to use i for IF condition in a loop, in order to get an efficient programming and results. Here is outlined SQL:
    cursor is
    select c1,c2,c3 from table1; -- 100 rows returned.
    open cursor
    loop
    fetch c1,c2,c3 into v1,v2,v3;
    for i in 1..3 loop
    if 'v'||i between 90 and 100 then
    v_grade := 'Excellent';
    elsif 'v'||i between 80 and 89 then
    elsif 'v'||i between 50 and 59 then
    end if;
    end loop;
    close cursor;
    This way, I don't need to use a lot of if..then for hard code v1,v2,v3,.... actually I have more v..
    But Oracle gave an error of this usage of 'if 'v'||i' or 'v'||to_char(i).
    Thanks for any advice in advance!

    user508774 wrote:
    Thanks for comments and advices. But I didn't get your inputs clearly. Are you saying I don't need to use PL/SQL to achieve this?Correct. Ronel and John showed you the basic approaches. SQL is not a mere I/O language for making read and write calls. It is a very capable, flexible and powerful language. One can solve a problem with a few lines of SQL code, that will take 100's of lines of PL/SQL or Java code.
    So do not underestimate what can be done in SQL.
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    EXECUTE IMMEDIATE v_cmd;This code is also wrong. Besides the fact that there is no need for dynamic SQL, this approach creates a brand new SQL statement each loop iteration.
    SQL is source code. It needs to be parsed (compiled). The end result is an executable program that is called a cursor. This cursor needs to be stored in server memory (the SQL Shared Pool in the SGA).
    The problem with your code is that it is slow and expensive - it generates lots of unique SQL statements that need CPU for parsing and server memory for storage.
    These add up to a very significant performance overhead. That is the wrong approach. The correct approach is the same one that you would use in any other programming language.
    Let's say you need to use Java to process a bunch of CSV files - exact same CSV layout used by each file. A file needs to be read, processed, and a log file created.
    Will you write a Java program that loops through the files, for each file found, write a Java program for processing that file, compile it, then execute it?
    Or would you write a Java program that takes the name of the file as input, and then process that file and writes the log file?
    The 2nd approach provides a program that can process any of those CSV files - one simply needs to pass the filename as an input parameter.
    Your code and approach use the 1st method. Not the 2nd. And that is why it is wrong.
    To create a SQL program with parameters is done by using bind variables. Instead of
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    The following SQL source code should be created:
    v_cmd := 'UPDATE parts_categ_counts SET w1=:v1, w2=:v2 ..., w9=:v9 WHERE seq= :vseq';
    The tokens with the colon prefix (such as :v1), are bind variables. Think of these as the parameters to the SQL cursor.
    The server parses this SQL into a cursor. You can now execute the same cursor over and over again, using different bind variables. (just like the 2nd approach above that one would use in Java)
    In PL/SQL, this is made even easier as you can code native SQL code with PL/SQL code and use PL/SQL variables in it. The PL/SQL compiler is clever enough to do the SQL parsing, variable binding, and cursor execution for you. So in PL/SQL, you would use:
    UPDATE parts_categ_counts SET w1=v1, w2=v2 ..., w9=v9 WHERE seq= vseq;
    Where v1 and the others are PL/SQL variables.
    That all said - PL/SQL is only used for data crunching, when the processing of data is too complex for the SQL language to deal with. And this is very seldom the case.
    The main reason for using PL/SQL it to provide processing flow control, conditional processing and error handling, for SQL code. As the SQL language does not have these features.

  • Why doesn't SAP use SAPUI5 for this and that

    This is my personal opinion about this topic! Again and again I stumble about this and now I want to share some of my thoughts about this topic. I want to share this from a point of view, when I was not a SAP Employee - I worked at a SAP Partner company - because this best reflects the view from the outside.
    1. SAP "wants" us to use SAPUI5
    I don't think that "wants" is the right word - the right word is offers! In terms of: hey now even included in your license and open sourced (because you wanted it so). Look - we build sooo many Fiori apps with it - and put in some great enterprise features (right to left, accessibility, translation, ...) and it is responsive. So if you want to build Fiori-like "apps" - there you go - this is your technology to go! This is what I understood.
    I was very very very happy that it was build with open standards. But the main point for me another thing - (because I worked with Sybase Unwired Platform and SAP Mobile Platform) OMG an open data protocol!!! OData FTW! I could use ANY front-end technology and consume SAP data - the protocol is REST based - a dream came true. And so I did - yes I played around with Sencha Touch and OData, I used data.js and used it in a standard HTML5 application. We played around with an iOS application we already had and consumed the data. I feed the data into d3.js. I prototyped around with SAPUI5 and I have build apps with it. Brilliant, so I could choose whatever UI technology I wanted.
    I always had the feeling, that SAPUI5 was meant for B2E applications - and building many of that - and they should look and feel the same and I can theme the apps. I can use it when I want to make my applications SAP like - so that the user thinks the apps are all the same and everything fits nicely into the Fiori launchpad - great if you want to build partner apps. In my ex company we won a SAP Pinnacle Award - for a native iOS app, no SAPUI5 in sight - but we have received an award, so SAP did not "want us" to use SAPUI5 ;-)
    2. Is it the right UI technology for everything?
    At my ex-company I was dealing with mobile applications and web apps. I always knew that I get the best user experience when I write a real native application and if you want it to look like in a very specific way with awesome UI --> you would not do it with a write-once-run-everywhere HTML5 super-styled wrapped (phone gap/cordova) app - you would write the apps for the specific platform and it should feel like it was written for the platform. SAP offered us the SAP Fiori Client that I could enhance the user experience for the Fiori apps, but I was never told to use SAPUI5 it for everything.
    The same discussion goes on with: why was the new SAP website not build with SAPUI5, or the UX Explorer (eat your own dog food), or a useful internal app - why Angular, or the other way around why do we even use SAPUI5 and not Angular JS itself. Back to the past - SAP did never tell me to build a website with it, or to build something tiny and small with it (a widget) - or to enhance parts of a website with it - or to build something super-specific with it.
    And yes maybe the UI in a mobile app was not SAPUI5 but do you know if it uses Gateway with OData or the SAP Mobile Platform, was the API managed with Apigee, was HCI involved in getting the data from different sources, was it maybe wrapped with SAP Mobile Secure, did it maybe use a HANA backend or some of its features (predictions, text analytics, ...) - are some backend parts maybe hosted on HCP - who knows? So yeah, maybe other SAP technology was involved which you don't see, but in the end it made your life simpler.
    Instead of arguing around why this and that was used for this and that - can we save our energy and instead look at the result - which is all what counts - that it was the right UI technology with the right user interface which makes the user happy? I stated something like - does Google use AngularJS for everything? Nope. They offer us something great we can use. Right, maybe AngularJS is not as important for Google like SAPUI5 is for us. But we have something with which we can build our day-to-day business apps with and we do so.
    3. We missed great opportunity in not using SAPUI5 for this and that
    Let's think about how projects are going: you want something, you look at the costs, you choose most efficient option. Yes this could mean reusing an existing native application which was written long ago and you pimped it up. Or you had outsourced it to a company which wrote a similar app. Or you bought the source code. Or you have some cheap internal staff which could do it (students, trainee), or you could outsource it cheaply. Or all you have is people with experience in this and that technology. Or it must look in a very very specific way (because marketing says so) and you go native. Or it maybe should even differentiate itself and should look NOT like a Fiori app. And no - I don't think - this is my employees view - we are not for example an event app producer. We normally build business applications. And I don't think that we can write an app from scratch "just" for an event in a certain technology. Yes it would be nice if this and that would use SAPUI5, I think if it would be possible in terms of time and costs and UI wishes and hundreds of other factors we would do it with SAPUI5.
    Working at the partner SAP showed me over 50 Fiori apps, now hundreds of Fiori apps are released. SAP now showed that SAPUI5 is going big with S/4HANA. We have seen the Simple Finance solution. I was walking around at the CeBIT this year and I was impressed myself which cool apps and screens have been shown with SAPUI5. I used the SAPUI5 app on a Samsung Smart Watch myself. The SAP Web IDE itself is built with SAPUI5 in its heart. I don't need any other "proves" that SAPUI5 is great. I have seen great use cases for it, but I also know myself when I would use other stuff.
    4. My conclusion
    There is never every anything which can cover all different use cases. One-size-fits-all clothes also does not fit for everyone even if it says so. If someone creates something great don't judge it by the UI technology. Judge it by the experience and the value it creates. There are reasons why this and that was chosen. Use what fits your needs best with your requirements. Make the end user happy!

    Hey Denise,
    Thanks for pulling this discussion into SCN. Makes it much easier to discuss compared to Twitter. But I also have to apologize in the beginning that my answer now exceeds 140 characters by 50 times.
    Let me share my thoughts and personal opinion as well. I will try to look at it from a strategic point of view, as you – as the technical UI5 expert - have already covered the technical perspective.
    SAP recommends using SAPUI5 where it fits to customers’ requirements
    Let me begin with a clear statement from my perspective: It makes no sense that SAP takes customer decisions.
    Of course, customers expect SAP to help them with their strategies and decisions and of course we are helping. But at the end, the decisions have to be taken by the customer who needs to take the specific conditions of the company into account. The most important condition in the context of UX is the end user. But we shouldn't forget the business strategy as the most important influence factor. I’m not saying that technical decisions are completely unimportant, but I would like to point out that other things are more important for a company.
    As a result, it wouldn't make a lot of sense if SAP would just want every customer to use SAPUI5. To me, customers need recommendations leading to solutions that satisfy their needs and requirements.
    There is not that one UI technology that serves all needs
    This headline might be a challenging statement and I can already imagine reactions to it. But in fact I can confirm this sentence easily. You always have to combine different technologies. Some of them are from SAP others not. The selection and combination of these technologies is different from customer to customer because the requirements are different. There are still reasons to use Web Dynpro ABAP and I’m still recommending SAP NetWeaver Business Client, POWL (Power Lists), WDA Chips, FPM based on the given environment of the customer. And obviously there are also reasons for UI5.
    SAP already proves the usage of SAPUI5
    In general, I see two different use cases here: Developing custom applications vs. adopting applications from SAP.
    In the one case, customers want recommendations on development environments and UI technologies that consider their development requirements and existing conditions (e.g. existing skills, given implementations). SAPUI5 is a great UI technology and there are some special aspects that make the decision obviously easy. If I want to create simple business applications that can be connected with my SAP system easily, especially in combination under responsive conditions on multiple devices and targeted for casual and/or occasional users UI5 might be the right choice for many.  Exactly this pattern is what many customers are searching for these days. So, the recommendation for UI5 comes quite often.
    Whether or not SAP proves the usage of SAPUI5 in their own world is to me more connected to the use case where customers want to adopt SAP applications. And in deed, SAP is using SAPUI5. There are hundreds of SAP Fiori applications that have been built with SAPUI5 and there have been a lot of other applications developed using SAPUI5, too. And again, there is a huge need for applications for casual and/or occasional users, so that’s a big reason for SAP to create such applications.
    Websites vs. Business Applications
    This discussion was triggered by some statements in twitter, that SAP sites such as sap.com, SAP UX Explorer or the latest mobile conference app are not developed using UI5. Actually I see these to be websites but not business applications. I have never told a customer to build a website in UI5 and I would continue to do so.
    Maybe we need to discuss the difference between a website and a business application. I guess it is not easy to find a common understanding here, as the borderlines between several worlds have disappeared in the last years.
    Some years ago it was more or less easy to differ between:
    Native desktop applications running on a specific desktop OS
    Native mobile applications running on a specific mobile OS
    Browser-based applications running in specific browsers
    Websites, basically running on many browsers
    In the first three categories we saw business applications. 1 and 2 were selected especially when specific functions of the device and OS where needed to be accessed (for example the camera of the mobile device, the fast rendering capability of the desktop). 3 was also used for business applications but in most cases on desktop browsers.
    Today, one can develop browser-based applications that look like native applications and even can access the devices like native applications. Responsive design breaks the borderlines even more. Now, browser-based content can be rendered perfectly on a desktop browser as well as on a mobile phone and a user might even not be able to judge whether it was originally intended to be developed for the one or the other.
    So maybe there is no big difference anymore between websites and browser-based applications. But there is still a difference between browser-based applications and browser-based business applications, where additional requirements such as integration into business systems are drivers. Here I see SAPUI5 as a very cool UI technology.
    That’s just my 2 (personal) cents,
    JJ

  • How to use two split this method in my code

    How to use two split this method in my code
    if i got one string line which like this
    ("aa!bb!cc~ab!bc!cd") a
    nd want to use two split to spare ! and ~ this seal for my spare point how that output
    has come diff ?
    public static void main(String[] args) {
        String str = "aa!bb!cc~ab!bc!cd";
        String strs[]= str.split("~");
        String strE[]= str.split("!");
        int count =0;
        for(int j=0; j < strs.length; j++){
          for (int i = 0; i < strE.length; i++){   
              System.out.println(count + " " + strE);
    count++;
    the output how can it be like this
    0 aa
    0 bb
    0 cc
    1 ab
    1 bc
    1 cd

    Move your second slit inside the first loop, so you are splitting the substring, not the entire string.

  • How to Use 'uid' for AD Users Without Domain Name For User Log in OAM

    How to Use 'uid' for synchronized Active Directory (AD) Users into Oracle Internet Directory (OID) Without Domain Name For User Logins in OIDDAS and OAM
    We successfully integrated OAM 11g with EBS R12.1.3 Now all the AD user id's stored in fnd_users table as [email protected]
    How can we remove @abc.com
    We are using OID 11g and OAM 11g
    Found the similar note for OID 10G: How to Use 'uid' for AD Users Without Domain Name For User Logins in OIDDAS and SSO [ID 580480.1]
    We are in OID 11g.
    Any help on this greatly appreciated.

    I couldn't find any reference that could be helpful -- Please log a SR and see if this is supported and if the steps are available.
    Thanks,
    Hussein

  • Install Sun ONE Directory Server 5,2 & how to use it for authenticate user

    Good afternoon, Excuse, are newbie in the scope I am learning and putting desire to him, this in my situation I am trying to install Sun ONE Directory Server 5,2 since I understand that this it is application LDAP for Solaris, ok I want to install it to authenticate user against the system, that is to say, to be able to acces the server entering with a created user from the data base of LDAP and make think user that his created in the system. But the documentation that I finds indicates the installation of Sun ONE Directory Server 5,2 but it not clearly about how to use it for authentication. Some one have any manual step by step of Sun ONE Directory Server 5,2 installation and how to make it for authentication systems users.
    I read the forum seeking for anwser and i get confuse
    Thanks for the help and sorry for any inconvenient
    Message was edited by:
    Aku_28
    Message was edited by:
    Aku_28

    I think that I found the Sun endorsed book locations for using LDAP accounts that don't use authentication besides "crypt". I now can use an account with a "ssha" password. It can be more than 8 characters long.
    Chapter 14 System Administration Guide: Naming and Directory Services
    Read page 201 which is the pam.conf file pam_ldap setups. I edited my "/etc/pam.conf" file to reflect this
    Chapter 7 Directory Server 5.2 2005Q4 - Administration Guide
    Read page 316-318 which has a graphical technique to specify password syntax. I set it up and then tried the password by running "su - brahms". It now requires a longer password than 8 characters and it is set up to use "ssha" for that UID entry "brahms".

  • Oracle:how to use max() function in case expression

    how to use max() function in case expression, Please explain with any example

    Hope this helps and should be self explanatory
    with t as
    (select 1 col,100 col2 from dual union
    select 2 ,100 from dual union
    select 2 ,200 from dual union
    select 3,100  from dual union
    select 3,200  from dual  )
    select col, case when max(col2)=100 then 'with 100 range'
    when  max(col2)=200 then 'with 200 range' end  from t group by col

Maybe you are looking for