Need a little bit of help with substring...

Im very new at java programming, and need a bit of help with a problem:
Here is what I have:
System.out.print("Enter a string : ");
Scanner scan = new Scanner (System.in);
stringy = scan.nextLine();
Now I want to split the string "stringy" like this: h:hi:hip:hipp:hippo
I know this uses substring, but I can't figure out how to do it.
Any help would be great, thanks!

I know about the length method, what I dont knowis
how to use the length and substring methodstogether
to solve the problem i mentioned initially. There are three ingredients to perform this task:
- String.length()
- String.substring(int start, int end)
- for-statement:
http://java.sun.com/docs/books/tutorial/java/nutsandbo
lts/for.html
Pseudo code:IN <- input String from user
LOOP FROM 0 -> IN.length()
print IN.substring(?, ?)
print ":"
END LOOP
Remember, Im very new. ;)Remember that by just handing you the solution, you
will learn far less than finding things out by
yourself.
; )Thanks a lot, i should be able to figure it out froom the pseudo code. :)

Similar Messages

  • HT4208 I just need a little bit of help. I visited the american ap store looking for the new scrabble game which is not available in the australian ap store. Can't get it anyway as I don't have an account there. I am trying to get back to the australian a

    I just need a little bit of help. I visited the american ap store, using my i phone, to check out something. I dont have an account with them so I couldn't get what I wanted anyway.Now, I need to get back to the australian store and I don't know how to do that. Please help!

    Go to app store- scroll down to bottom- click on apple id- change country

  • Little bit of help with the duplication process needed

    Hi
    I trying to duplicate a database from one server to a remote server. They are both running windows server 2003 (my first problem) , the primary server is running oracle 11gR1 and the (hopefully) receiving server is running 11gR2(is that going to be a problem?) and I'm a little stuck on some parts of the process.
    The book I'm using says to edit the listener.ora file to include a SID_DESC of the remote database. Here is my listener.ora file with the modifications
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.host.local)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CGARDMSTR)
    (ORACLE_HOME = G:\app\administrator\product\11.1.0\db_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = CGARDMSTR)
    (ORACLE_HOME =G:\app\administrator\product\11.1.0\db_1)
    (SID_NAME = CGARDMSTR)
    *(SID_DESC* *=*
    *(GLOBAL_DBNAME* *=* cgard)
    *(ORACLE_HOME* *=F:\oracle\product\11.2.0\dbhome_1)*
    *(SID_NAME* *=* cgard)
    (bold is what i added)
    it then said to chnage my tnsnames.ora
    CGARD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.host.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = cgard)
    CGARD5DE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.host.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CGARD5DEV)
    CGARDMST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.host.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CGARDMSTR)
    cgard =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = live.host.local)(PORT = 1521))*
    *(CONNECT_DATA =*
    *(SERVER = DEDICATED)*
    *(SERVICE_NAME = cgard)*
    I changed the local domain to host for business reasons
    The next step was to create a initialization parameter file which I am guessing is a pfile and hopefully not a spfile. It then says to only enter one param db_name and the conversion params if the filesystem is diffrent. Problem is I don't know what to do with this file, if I am suppose to switch the second database to this file then surly I would need some more params? Anyway thats the first of many questions.
    When I try to run through the rman commands it describes it also trips up:
    RMAN> connect auxiliary sys/*********@live.host.local
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-04006: error from auxiliary database: ORA-12170: TNS:Connect timeout occurr
    ed
    The other database is up and connectable via sqldevloper so I'm guessing it was my configuration of listener and tnsnames
    Ok to reiterate my questions are:
    1) what needs to be in the pfile I create for the database thats going to receive the backup and what do I do with that file when I have made it?
    2) I am pretty sure my listener and tsunamis config is completely wrong so can I have some pointers on fixing that?
    3) Was the reason I could not connect to the receiving database my tns and listener config or is it something else?
    Quite a few other questions but untill I know some more about the above I doubt I will be able to ask properly.
    Also if this helps the book I am using is Expert Oracle Database 11g Administration and the page is 835(the method that begins on that page) and I am willing to write out the whole method if you need more details.
    Oh and if you havent figured it out I am very new to this so if some of this sounds very wrong or just stupid just say what I need to change and I will get right on it.
    Thanks
    Alex

    Ok so I have made some progress. Here is where I am currently at:
    RMAN> RUN
    2> {
    3> SET NEWNAME FOR DATAFILE 1 TO 'F:\oracle\oradata\cgard\file1.dbs';
    4> SET NEWNAME FOR DATAFILE 2 TO 'F:\oracle\oradata\cgard\file2.dbs';
    5> SET NEWNAME FOR DATAFILE 3 TO 'F:\oracle\oradata\cgard\file3.dbs';
    6> SET NEWNAME FOR DATAFILE 4 TO 'F:\oracle\oradata\cgard\file4.dbs';
    7> SET NEWNAME FOR DATAFILE 5 TO 'F:\oracle\oradata\cgard\file5.dbs';
    8> SET NEWNAME FOR TEMPFILE 1 TO 'F:\oracle\oradata\cgard\temp1.dbs';
    9> duplicate target database
    10> to cgard
    11> from active database
    12> pfile='F:\oracle\product\11.2.0\dbhome_1\database\initCGARD.ora';
    13> }
    executing command: SET NEWNAME
    starting full resync of recovery catalog
    full resync complete
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting Duplicate Db at 19-NOV-10
    using channel ORA_AUX_DISK_1
    contents of Memory Script:
    set newname for datafile 1 to
    "F:\ORACLE\ORADATA\CGARD\FILE1.DBS";;
    set newname for datafile 2 to
    "F:\ORACLE\ORADATA\CGARD\FILE2.DBS";;
    set newname for datafile 3 to
    "F:\ORACLE\ORADATA\CGARD\FILE3.DBS";;
    set newname for datafile 4 to
    "F:\ORACLE\ORADATA\CGARD\FILE4.DBS";;
    set newname for datafile 5 to
    "F:\ORACLE\ORADATA\CGARD\FILE5.DBS";;
    backup as copy reuse
    datafile 1 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE1.DBS"; datafile
    2 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE2.DBS"; datafile
    3 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE3.DBS"; datafile
    4 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE4.DBS"; datafile
    5 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE5.DBS"; ;
    sql 'alter system archive log current';
    executing Memory Script
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting backup at 19-NOV-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=143 device type=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00001 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\SYS
    TEM01.DBF
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:23:
    52
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00004 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\USE
    RS01.DBF
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:24:
    24
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00002 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\SYS
    AUX01.DBF
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:24:
    43
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00003 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\UND
    OTBS01.DBF
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:25:
    17
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00005 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\RMA
    N01.DBF
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 11/19/2010 16:25:55
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:25:
    55
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    RMAN>
    I did issue the commands:
    C:\Documents and Settings\Administrator>rman target /
    Recovery Manager: Release 11.1.0.6.0 - Production on Fri Nov 19 13:55:40 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    connected to target database: CGARDMST (DBID=3160500813)
    RMAN> connect catalog rman/rman
    connected to recovery catalog database
    RMAN> connect auxiliary sys/**********@cgard
    connected to auxiliary database: CGARD (not mounted)
    So I am not quite sure what it wants. I read somewhere about a password file but I don't understand how it will help, also most things I have looked at wernt clear on how to do it. I took a stab anyway:
    G:\app\administrator\product\11.1.0\db_1\BIN>orapwd file=orapwcgard password=*********** entries=20 ignorecase=n
    Was run on the original database host.
    File was then copied to "F:\oracle\product\11.2.0\dbhome_1\database" on the receiving database's host it was then renamed to PWDcgard.ora as there was file there already with that name.
    It did not help(same error).
    The book I am using mentions the 'PASSWORD FILE' param to be used with the duplicate command but I cant find a example on how to use it so any help with that would be great.
    Thanks for the effort so far guys its really appreciated.

  • A little bit of help with Bind variables please

    Hi,
    I am having a bit of trouble with bind variables I have been looking at the Dev guide and the forum to try and achieve this and it is still not happening for me, could anybody please help or point me in the right direction:
    I have created a simple PersonVO with the basic query:
    Select distinct full_name from xxml_people where person_id = :1
    In the PersonVOImpl.java I have added the method:
    public void initQuery(String personId)
    Number person = null;
    try
    person = new Number(personId);
    catch
    (Exception e){}
    setWhereClauseParam(1,person);
    executeQuery();
    Then in the PersonAM I have added the method:
    public void initPersonQuery(String personId)
    getPersonVO1().initQuery(personId);
    I then call this method in my processRequest section of my page controller:
    PersonAMImpl am = (PersonAMImpl) pageContext.getRootApplicationModule();
    String personId = "581";
    am.initPersonQuery(personId);
    When I try and run this I get the error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT distinct full_name from xxml_absence_calendar where person_id = :1
    java.sql.SQLException: ORA-01006: bind variable does not exist
    Am I binding the variables correctly? Or am I making some stupid mistake?
    I am ultimately looking to create a messageChoice where the logged in user will see a list of all organisations underneath him and the one level above. I plan to do this by passing the User’s Organisation name into a VO query using the organisation as a Bind Variable. I think once I have worked out how to bind variables this should be straight forward.
    Many Thanks

    Even though the parameter binding values may be same, you should never use the positional param more than once. So always go for the format
    select distinct full_name from xxml_people where supervisor_id = :1
    UNION
    select distinct full_name from xxml_people where person_id = :2
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Little bit of help[ with a button.

    Good day all!
    I need help making a button. This is what I want to happen.
    I have a bunch of text, One of the words "merino" is bule as
    to say there is a link hear! And I want an image of the "merino" to
    come up, like a "ALT" box. Or have an image in the "ALT" box?
    I know how to do this in "Flash" i.e just drop in the image
    on the over state of the button event. Easy as pie! This is why I
    cant get to grips with Dreamweaver! I hate it!
    But I am willing to learn and maybe in time love???
    Thanks all!

    "satrop" <[email protected]> wrote in
    message
    news:f0o4t7$954$[email protected]..
    > Good day all!
    >
    > I need help making a button. This is what I want to
    happen.
    >
    > I have a bunch of text, One of the words "merino" is
    bule as to say there
    > is a
    > link hear! And I want an image of the "merino" to come
    up, like a "ALT"
    > box.
    >
    > I know how to do this in "Flash" i.e just drop in the
    image on the over
    > state
    > of the button event. Easy as pie! This is why I cant get
    to grips with
    > Dreamweaver! I hate it!
    >
    > But I am willing to learn and maybe in time love???
    HTML is a lot different from Flash! :-)
    I believe you could do this using DW's Show-Hide layer
    behavior - have
    mousing over the link trigger a layer with the image to
    appear. Someone else
    may have a better idea.
    Just FYI, having to mouse over a link in order to get more
    information about
    it isn't usually appreciated by users. You *might* want to
    re-think this
    plan..
    Patty Ayers | Adobe Community Expert
    www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet

  • A little bit of help with arrays

    Hi guyz
    I have a problem regarding reading and processing element of an array. I have a "Reference Base Generator" and for example I generate a sine wave. Then I use "Get waveform components" to get the data from the graphic, after this i have a 1-D array of data  (right?) at the output of the "Get waveform component' bloc. I need to read every element, process it and then send it as a value further to a function input. So, how can i get every element of that array and send it further ?
    I hope I was clear with my problem.
    It would be great if you could provide me with some help. 
    Thanks alot,
    Andrei_L. 
    Solved!
    Go to Solution.

    And just for completeness sake:
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Example_VI_BD.png ‏24 KB

  • Nokia 720 Problems - Need a little bit of help her...

    Hi,
    Few Problems with a 10 day nokia 720:-
    1. Earphone volume while in a call - I can't change the earphone volume while in a call. This is very frustating. Is this a problem with my nokia 720 or is this a general issue with all 720.
    2. Microphone doesn't work in certain directions, while in a sleeping pose or sometimes sitting. This has never happened to me in around 6-7 phones that I have used. Please tell me if this is a problem for my phone or device issue.
    3. When I switch off mobile data connection, my overall mobile connection is lost after some time. Also I am experiencing too frequent call drops, Also my network just goes out of the picture, it just doesn't detect network. Facing a lot of issues with this,
    4. Sometimes it zooms out and doesn't come back to its original position. I don't know what is the problem with this. I have to restart my phone to get back in normal position.
    5. My bookmyshow app doesn't work after the update [this can be ignored ]
    I expected more out of my nokia lumia but hard to say if the problems are with my phone only or for all nokia 720. Hoping for some help in this forum.
    Also please tell me if nokia will change my device if this is a problem with only my device and not every device. Please help.
    Thanks in advance

    the screen zoom problem and mic problem is there in many phones.
    hv not been able to sort mic /call drop issue, bt for zoom
    the phone zooms by double tap on any screen, this is a feature in ease of access. go to settings->ease of access->screen magnifier->off.
    Pushpender wrote:
    Hi,
    Few Problems with a 10 day nokia 720:-
    1. Earphone volume while in a call - I can't change the earphone volume while in a call. This is very frustating. Is this a problem with my nokia 720 or is this a general issue with all 720.
    2. Microphone doesn't work in certain directions, while in a sleeping pose or sometimes sitting. This has never happened to me in around 6-7 phones that I have used. Please tell me if this is a problem for my phone or device issue.
    3. When I switch off mobile data connection, my overall mobile connection is lost after some time. Also I am experiencing too frequent call drops, Also my network just goes out of the picture, it just doesn't detect network. Facing a lot of issues with this,
    4. Sometimes it zooms out and doesn't come back to its original position. I don't know what is the problem with this. I have to restart my phone to get back in normal position.
    5. My bookmyshow app doesn't work after the update [this can be ignored ]
    I expected more out of my nokia lumia but hard to say if the problems are with my phone only or for all nokia 720. Hoping for some help in this forum.
    Also please tell me if nokia will change my device if this is a problem with only my device and not every device. Please help.
    Thanks in advance

  • I need a little bit of help if possible that is

    so i got my ipod about 3 weeks ago or so and i was diconnecting it right the entire time but i left in to charge one night and my sister decided she need that port for her camera and pulled it out incorrectly at first the screen was frozen on do not disconnect but i got past that..now i have nothing on it when i go to put my music on it i get the message "The iPod "IPOD" cannot be updated. The required file cannot be found" is there anyway to fix that?????? Thanks

    I know about the length method, what I dont knowis
    how to use the length and substring methodstogether
    to solve the problem i mentioned initially. There are three ingredients to perform this task:
    - String.length()
    - String.substring(int start, int end)
    - for-statement:
    http://java.sun.com/docs/books/tutorial/java/nutsandbo
    lts/for.html
    Pseudo code:IN <- input String from user
    LOOP FROM 0 -> IN.length()
    print IN.substring(?, ?)
    print ":"
    END LOOP
    Remember, Im very new. ;)Remember that by just handing you the solution, you
    will learn far less than finding things out by
    yourself.
    ; )Thanks a lot, i should be able to figure it out froom the pseudo code. :)

  • Need a little bit of help

    Hi, i'm trying to make my java files runable from other machines and using the jar utility to do it. I have 10 files that get added to my jar file, and they are as follows:
    Tester.class, Deck.class, Suit.class, SavitchIn.class, Player.class Card.class, Pips.class, CardSet.class, Hand.class, BlackJackHand.class
    I am using this command to jar them:
    D:\ITAS186T\Project1>jar cvf Tester.jar Tester.class Deck.class Suit.class SavitchIn.class Player.class Card.class Pips.class CardSet.class Hand.class BlackJackHand.class
    my public static void main is in Tester.class so I modified the manifest to include Main-Class: Tester.class
    now when i try to run it with this command: java -jar Tester.jar
    i get this error:
    Failed to load Main-Class manifest attribute from
    Tester.jar
    Any ideas?
    Thanks in advance,
    Terry

    Heh, now I get this.. will it ever end!! :P
    Thanks for all the help.
    D:\ITAS186T\Project1>java -jar Tester.jar
    Failed to load Main-Class manifest attribute from
    Tester.jar

  • Need a little bit of guidance

    I need a little bit of guidance. 
    My plan is to make a PKGBUILD, but I've ran into a few snags.  I'm trying to make PKGBUILD for ToME-223-src (Troubles of Middle Earth).  But first I want to compile and install it locally so I'll have a good idea of how to make the PKBUILD right and to test it for awhile.  So the PKGBUILD is something later on to worry about.
    I have a bit of delimma.  For some reason, the developer(s) of this game have the binary for it to use suid (I'm not sure their reasoning since I'm not a very experience programmer).  Fortunately, in the makefile, it uses the variable OWNER=games by default.  This is what is responsible for setting the ownership of all of the files when "make install" is ran appearantly.  This presents a few challenges.
    When you get to the point of where you make install it, it's install rule wants to recursively run chown on all the files being installed like a nice and tidy makefile does.  So if you're not logged in as root when  you do the "make install" it gets choked up a bit and doesn't copy/install all the files.  So a regular user account doesn't generally have needed privileges to run chown and it has to be assumed when someone is going to install my tentative package they won't either.
    Another delimma is that since it wants to utilize suid, this creates the necessity of a regular user account to be the owner of these files (I don't like the idea of this game running with root privileges personally).  We don't want root ownership on whatever files have their suid bit set I would think.  So this will require the making of the appropriate user.  Again, this usually requires high enough privileges by the person building.
    This of course could be solved by using useradd in the build function, and the having builder being logged on as root when they makepgk, but I really don't like that nor feel it's a very kosher approach.
    Any idea of how I can come up with an elegant solution to this?  How is this sort of situation normally handled with ABS?

    If a package needs chown on install, or a new user created, this is typically done in the .install script. When pacman installs the pakcage, the .install script is run as root.
    Based purely on your description, my suggestion would be to skip the make install stage, and use install commands in the PKGBUILD to put the files in the right places. In the .install script, create the required user and associated permissions.
    Here's a typical example.

  • Need a bit of help with css and fullscreen

    I am currently doing a javaFX application for my university project, I have it everything nearly finished, but need to finish the css component to make the application "prettier" (I am not very good on graphic design to be honest). So if i could get a bit of help on this little issue I'd be very grateful.
    is there any way to make fullscreen (and if possible resizing window) to instead rearranging everything to actually do a fullscreen (like the games) and everything "grows accordingly (even though in games what it usually does is to change the screen resolution, is that possible to reproduce with javaFX?) also how to remove the message and the effect on click the "esc" key to exit the fullscreen mode?
    i know that removing the focus effect on an element is with the following (if a button)
    .button:focused{
         -fx-background-insets: 0;
    }but,is there any way to remove the effect on anything focused (TextField, Combo Box, ...)? (tried with a .textfield:focused but it did not work)
    also i wanted to produce the focused effect by this way but it didn't work, how should i do it? (in fact even if i try to put this line on the button:focused, the focused effect gets removed from there, because of the insets line)
    #highlight{
         -fx-background-insets: 2;
         -fx-background-color: yellow;
    public class controller extends StackPane implements Initializable{
         public void highlight(){
              this.getStyleClass().add("highlight");
    and last thing (for the moment) the .button seems to work for all the buttons, but trying another thing like .gridpane or .textfield or .scrollpane does not seem to work, is there any way to make it work or i should add "id" to all the elements and use the # instead?

    i wrote all them in the same thread becsause there were a total of 4 (and could had been more) separated by ----
    should i leave it how it is or open now 4 threads for each question?

  • Little bit of help

    Hi,
    I wonder if anyone can help me with my problem.
    Here is my piece of SQL.
    I know what I currently have - *(CASE WHEN ITL.FROM_LOC_ID = 'W%' THEN 'D1' OR WHEN ITL.FROM_LOC_ID != 'W%' THEN 'D2' END) Site* is wrong.
    And I was just wondering if anyone could show me how to set out what i'm trying to do in the correct way.
    Basically, all I want is an extra column called 'Site' and if ITL.FROM_LOC_ID = 'W%' then display 'D1' if not then display 'D2'.
    SELECT DISTINCT AU.NAME, ITL.REFERENCE_ID, (CASE WHEN ITL.FROM_LOC_ID = 'W%' THEN 'D1' OR WHEN ITL.FROM_LOC_ID != 'W%' THEN 'D2' END) Site
    FROM INVENTORY_TRANSACTION ITL, ORDER_HEADER OH, APPLICATION_USER AU
    WHERE CODE = 'Pick'
    AND TO_LOC_ID = 'CONTAINER'
    AND ITL.REFERENCE_ID = OH.ORDER_ID
    AND OH.DELIVER_BY_DATE >= TO_DATE($P{Deliver_By_Date},'DD-Mon-YYYY')
    AND OH.DELIVER_BY_DATE < TO_DATE($P{Deliver_By_Date},'DD-Mon-YYYY') + 1
    AND ITL.USER_ID = AU.USER_ID
    ORDER BY ITL.REFERENCE_IDThanks in advance.
    Sam

    Thanks Ibrahim,
    I got some data back, adding that to my query. However I have just realised there may be something else I need to add in..
    With adding that to my query each record displayed D2 in the Site column.
    This is because my live data thats i'm pulling from the database looks like this;
    Reference ID      Name               From_Loc_Id
    0080107253        Sam Mardell        W0001
    0080107253        Sam Mardell        W0003 
    0080107253        Sam Mardell        W0004 
    0080107253        Sam Mardell        W0005 
    0080107253        Sam Mardell        W0008
    0080107253        Dan Smith          A07A 
    0080107253        Dan Smith          A45A
    0080107253        Dan Smith          B37A
    0080107253        Dan Smith          D34A
    0080107253        Dan Smith          E02A   So my output I would like to look like this;
    Reference ID      Name               Site
    0080107253        Sam Mardell        D1
    0080107253        Dan Smith          D2  Currently i'm getting;
    Reference ID      Name               Site
    0080107253        Sam Mardell        D2
    0080107253        Dan Smith          D2  I think because the Reference_ID refers to both sites in the query.
    Hope this makes sense.
    SM.

  • Need a little QoS setup help

    previously owned a netgear wndr37av and quite promptly returned it.  certain functions just didn't work. and things seemed sluggish.  anyhow, went with a e4200 and thus far i am quite pleased.  only thing i need help with now is setting up QoS properly as i've never had a router with this feature.  i understand the priciple and how to setup rules.  what i need help with is.......
    for instance i have a ps3, laptop, desktop (soon as i get all the parts from newegg), directv dvr box, printer, cell phones etc.  but the main focal points are the ps3, laptop, and desktop.  obviously i want the ps3 to have priority over everything else for gaming and netflix/vudu.  so i would assume simply giving it's mac address highest priority will take care of that.. but when it comes to the desktop which will be the main source of any torrent downloads. how do i push torrents down on the list but still keep the other programs on the desktop (i.e. - firefox, youtube, any games, whatever else) supplied with a higher priority that would only be trumphed by the ps3?
    i hope i described my issue well.  if not feel free to ask and i'll try to elaborate more.
    thanks

    Settings up QoS on  your Router you can follow this link.

  • Help With SUBSTR in dynamic SQL statement

    Following is the dynamic SQL statement.
    EXECUTE IMMEDIATE 'UPDATE table_name pml
    SET pml.'|| con_fields.field ||' = SUBSTR(pml.'||con_fields.field||' ||'' ''||
    (SELECT pml1.'||con_fields.field||'
    FROM table_name pml1
    WHERE pml1.grp_id = '||los_concats.grp_id ||'
    AND pml1.row_id = '||los_concats.row_id||'
    AND pml1.loser_flg = ''Y''),1, '||con_fields.max_length||')
    WHERE pml.grp_id = '||los_concats.grp_id ||'
    AND pml.loser_flg IS NULL ';
    what it does is that it updates a particular field. This field is concatenated by a field of a similar record.
    My problem is with SUBSTR function. Since I am concatenating fields I do not want the field to be updated greater than max_length on that field, the reason why I use SUBSTR. the select query inside SUBSTR works alright with one of the AND condition in a WHERE clause not present. When I add that additional condition it gives me this error.
    ORA-00907: missing right parenthesis.
    Is there any way to get around this problem. Does SQL has other than SUBSTR function which can limit the character length.
    Appreciate it.

    The other alternative I thought about was to do this first
    EXECUTE IMMEDIATE 'SELECT pml.'||con_fields.field||'
    FROM table_name pml
    WHERE pml.grp_id = '||los_concats.grp_id||'
    AND pml.row_id = '||los_concats.row_id||'
    AND pml.loser_flg = ''Y''
    ' INTO v_concat_field;
    write into the variable v_concat_field and then use it into the previous script.
    But on this I get SQL Command not properly terminated, I don't get it Why?
    Donald I tried with your suggested script. It works fine with one of the conditions eliminated. I don't understand what the error trying to say?
    Thanks

  • Need some help with Substring

    hi all
    i am writing a simple program and got stuck at one point
    this is how it goes:
    public static static main(String[] a) {
    for (int i=1; i<a.length; i++){
    System.out.print(a[i]+",");
    so if i entered "a ab abc" this becomes "a,ab,abc,"
    the problem is that i NEED to use substring to get rid of the last comma, how can i take the already print out result as a whole new string?? or i need to rewrite it in another way??
    i really need some help, thanks in advance
    B

    You start from index 1, skipping the first element in the a-array, is that what you want? Otherwise you should loop from 0.
    Anyway, here is how you can do it (skipping first element as you did):
    for (int x = 1; x < a.length; x++) {
      System.out.print(a[x]);
      if (x < a.length-1)
        System.out.print(",");
    }You can't remove what you have already printed out. Another way to do this, is with a StringBuffer:
    StringBuffer sb = new StringBuffer();
    for (int x = 1; x < a.length; x++) {
      sb.append(a[x]);
      if (x < a.length-1)
        sb.append(",");
    String s = sb.toString();
    System.out.println(s);

Maybe you are looking for

  • User name and passwords autofill

    user name and passwords autofill only autofills the user name and not the password. Any ideas on how to change this so that passwords are also autofilled?

  • IPhoto "metadata changes" and management with possible import to Aperture 2

    Sorry for the length of this but I am trying to get to figure out which will be the best product for me without having to waste more time and money. I may already have the best for what I want/need but I am not too terribly satisfied with it in its c

  • Can somebody please help me !!!

    i have an ipod shuffle and i have songs in it, but when i try to put it in another computer or a different itunes, it states " this ipod is linked to another computer " so it gives me the option to erase all the songs in my ipod and replace them with

  • HA SKU, HA controller ports down.

    Hi Friends, Hope you all are doing good. I have a situation.  I am deploying an HA controller for an already existing 5508 controller. I finished the configuration. tried enabling the AP SSO.  Some how it din't work well. HA went to maintenance mode.

  • How to trace the changes done through transaction R3AC3

    Hello SAPheads Is there any table are any transaction through which i can trace the changes done through r3ac1,  r3ac3 , r3ac5 ? Thank you Somasundaram Ganesh