Displaying results with comma

Hi i have two tables that have a one-to-many relationship and i want to display the output as comma delimitters. The two tables are
TABLE TABLE1
OVERSION_ID NUMBER NOT NULL,
PREVIOUS_V_ID NUMBER NOT NULL
TABLE TABLE2
OVERSION_ID NUMBER NOT NULL,
so for example if i run the query
select * from table1
the result is
OVERSION_ID PREVIOUS_V_ID
12456 25677
12456 25702
12456 27897
how can i write an sql query that will display all previous_v_id seperated by a comma like below
25677, 25702, 27897
Thank you very much.

i have used the wm_concat function and it worked
select oversion_id, wm_concat(previous_v_id) from table1 group by oaversion_id;
however i have 2 other tables
TABLE TABLE3
OVERSION_ID NUMBER NOT NULL,
OID NUMBER NOT NULL
TABLE TABLE4
OID NUMBER NOT NULL
ONUMBER VARCHAR2 NOT NULL,
You can see the relation between table 3 and table 4
how can I change the query
"select oversion_id, wm_concat(previous_v_id) from table1 group by oaversion_id;"
so that i get the output as onumber and not the previous_v_id
in other words how can I join these tables so the output is not the numbers (previous_v-id) , but the varchar2 (onumber) from table4

Similar Messages

  • Displaying results with a decimal place of two. Forcing decimal place.

    Hi there,
    Im writing a simple calculation device.
    You input one digit and press one of two buttons to multiply it by a certain number and then the result is displayed. The result is displyed hiding the result of the button you didn't press and visa versa.
    I am having a problem displaying the result with a constant two decimal place.
    I am using strings and thus don't know how to do this.
    Here is my code:
    import flash.events.MouseEvent;
    //restrict the input textfield to only numbers
    txtinput.restrict = "0-9";
    //restrict the input textfield to only two characters
    txtinput.maxChars = 6;
    // event listeners
    btnW.addEventListener(MouseEvent.CLICK, WHandler);
    btnC.addEventListener(MouseEvent.CLICK, CHandler);
    btnW.addEventListener(MouseEvent.CLICK, hideC);
    btnC.addEventListener(MouseEvent.CLICK, hideW);
    //functions
    function WHandler (e:MouseEvent):void
              //white calculation
              var answerW:Number = Number(txtinput.text) * Number(0.90);
              txtWResult.text = answerW.toString();
    function CHandler (e:MouseEvent):void
              //colour calculation
              var answerC:Number = Number(txtinput.text) * Number(0.99);
              txtCResult.text = answerC.toString();
    function hideC (e:MouseEvent):void
              //Hide colour result
              txtCResult.visible = false;
              txtWResult.visible = true;
    function hideW (e:MouseEvent):void
              //Hide white result
              txtWResult.visible = false;
              txtCResult.visible = true;
    After having a look online I have found these two resources:
    http://helpx.adobe.com/flash/kb/rounding-specific-decimal-places-flash.html
    and
    http://stackoverflow.com/questions/11469321/decimals-to-one-decimal-place-in-as3
    But I am confused when combining these techniques with strings.
    Any help would be greatly appreciated,
    Thanks in advance
    Mr B

    Use the toFixed() method of the Number class instead of the toString() method.  The result of it is a String with the number of decimal places you specify.
              var answerW:Number = Number(txtinput.text) * Number(0.90);
              txtWResult.text = answerW.toFixed(2);
              var answerC:Number = Number(txtinput.text) * Number(0.99);
              txtCResult.text = answerC.toFixed(2);

  • WAD Graph-  Value Axis display value with commas

    Hi Gurus,
    In the WAD graph Value Axis displaying the value from 0 to 40000 like below
    40000.
    30000.
    20000.
    10000.
            0.
    But we want to display with comma for every 3 digits(1000). like
    40,000.
    30,000.
    20,000.
    10,000.
              0.
    Please do needful.
    Regards,
    Kiran A
    Edited by: Kiran A on Oct 21, 2009 6:00 PM

    Hi Kiran A,
    you can do it as follows:
    Edit Chart->Refine->Value axis->Line->Format-> here you have to put: 0,
    That is all
    Regards
    Erwin

  • Slow display results with Fill() metod

    When I access database with 100 000 and more records
    and try to display page from end of database, fill method from DataAdapter is very slow. Maybe someone know solution for this problem ?
    sample code:
    start = 100000
    paczka = 500
    cn_all_catalog.ConnectionString = strconnection
    cn_all_catalog.Open()
    da = New od.Client.OracleDataAdapter(query_string, cn_all_catalog)
    da.Fill(DataSet1, start, paczka, "MyTable")

    You can play around with the FetchSize property of OracleCommand class to tune your application. You can set FetchSize to a large value to make less number of round trips to the database to fetch 100,000 rows but that would result in higher memory requirement on the client side.

  • Currency field to be displayed with commas and asterisks(formatting)

    I have a field REGUH-RWBTR in my sap script code. I need to have the currency displayed with commas. And also if the digits are less, then left pad it with asterisks for remaining spaces.
    For eg, If the Digit is 12345678912.23 (max value), it should print as 12345,678,912.23.
    And If the digit is 12345.89, it should print as ******12,345.89
    Please help me to solve this problem.Its urgent.
    Thanks,
    Sandeep.

    Hello,
    You can use the WRITE using EDIT MASK.
    USING { {NO EDIT MASK}|{EDIT MASK mask} }
    Effect
    This addition overrides a conversion routine defined through reference to the ABAP Dictionary. The addition NO EDIT MASK only switches off the execution of an assigned conversion routine. The addition EDIT MASK calls either another conversion routine or defines an edit mask. For mask, a data object of the same name is expected.
    In order to call an arbitrary conversion routine CONV, mask must contain two equals signs, followed directly by the name of the conversion routine: "==CONV". During output, the content of dobj is passed to the function module CONVERSION_EXIT_CONV_OUTPUT, converted there, and then the result is displayed. If the function module is not found, an exception that can be handled is triggered (as of Release 6.10). The statement DESCRIBE FIELD contains an addition in order to fill mask accordingly.
    If the output length is specified explicitly with len, the conversion routine is executed for the specified length; otherwise for the implicit output length. If * or ** is specified for the output length, the appropriate rules are used for the converted result.
    If the first two characters in mask are not equals signs, the content is interpreted as an edit mask in which some characters have a particular meaning. The WRITE statement does not then output the content of dobj directly, but the character string in mask as follows:
    If the first two characters in mask are "LL" or "RR ", these are not output, They control whether the edit mask is left-justified or right-justified. If the first two characters are other characters, the edit mask is left-justified.
    All "_" characters are replaced from the left (in the case of "LL") or from the right (in the case of "RR") with characters for character-type types or numbers for the types p or i from dobj. In the case of fields of type c, closing blanks are ignored. Data objects of type f or x are converted into type c before editing. Superfluous characters "_" in mask are replaced by blanks. Characters from dobj for which there are no characters "_" in mask are not displayed.
    If dobj is of type i or p, the first character from the left "V" in mask is replaced with "-" in the case of a negative number and by blank in the case of a positive number.
    All the other characters of the edit mask are displayed unchanged.
    If no output length is specified, the implicit output length of dobj is used. If len is specified for the output length, the value of len is used. If * is specified for the output length, exactly that length that is required for the list display is set. If, in Unicode systems, characters of the edit mask are replaced by characters that take up more than one column on the list, the output length is increased accordingly and the output is filled with blanks in the list buffer. If ** is specified for the output length, double the length of the edit mask mask is used.
    If other formatting options are specified concurrently for an edit mask, these are used first and then the special characters in the edit mask are replaced by the interim result. The date masks date_mask are an exception to this. If these are specified, the edit mask is ignored.
    Notes
    In Unicode systems, you must remember that a character "_"in the edit mask does not necessarily correspond to a column in the list display since the space required in the display depends on the character to be replaced.
    The minus sign for a negative number is not displayed if no edit character "V" is specified. The decimal separator of a packed number with decimal places must be specified at the required position in the edit mask.
    Example
    Edited output of time duration. In the first output, the function module CONVERSION_EXIT_DURA_OUTPUT is executed. This converts the duration specified in seconds into minutes. In the second output, the edit mask is output according to the above rules. However, the underscore characters "_" are replaced by the characters from time.
    DATA: dura TYPE i,
          time TYPE t VALUE '080000'.
    dura = sy-uzeit - time.
    time = dura.
    WRITE /(30) dura USING EDIT MASK '==SDURA'.
    WRITE /(30) time USING EDIT MASK
                           'RRThe duration is __:__:__'.
    Regards,

  • Restricting input to integers, display with comma separators

    I'm using Acrobat 8 on a Macintosh. My question is very similar to the previous one about truncation. I have a small array that adds and subtracts fields, and sums them to totals. The following scripts restrict the data entry exclusively to numbers, but my problem is that it doesn't display my fields in Acrobat with comma separators, e.g., 123,456. Is there a better way of doing this, or is it just a matter of adjusting the formatting script?
    Using a custom script under Format:
    Custom Format script:
    event.value = "(" + eventvalue +")";
    Custom Keystroke Script:
    event.rc = /^[0-9]*$/.test
    (event.change);
    Bill Lomax

    I'm not aware of any cultures that allow multiple consecutive separators, and of course "en-US" certainly doesn't. I think you answer is just that TryParse isn't as smart as you would like it to be.
    If you know how many digits there are after the decimal point, you could use ToString to convert the decimal back to a string and verify that it is the same as the original string. For example, if the string has a currency symbol, thousands separators and
    two decimal places, you could use the following:
    Dim result As Decimal
    Decimal.TryParse(Me.tbxkWhCost.Text, System.Globalization.NumberStyles.AllowThousands _
    Or Globalization.NumberStyles.AllowDecimalPoint Or Globalization.NumberStyles.AllowCurrencySymbol, Nothing, result)
    If result.ToString("C2") = Me.tbxkWhCost.Text Then
    'String is good
    Else
    'String is bad
    End If
    I realise that this doesn't work if you don't know what format the number will be in.

  • Displaying a number with commas in gid

    Hi EveryOne,
                       This is Ram Prasad.I want to display a number with commas in the grid (eg:1,000).In the grid it is shown as 1000.I wan to add commas for this number to be shown in the grid display template.Can any one help on this.

    That's an odd format, so I assume you mean 1 million to be displayed as:  1,000,000 ?
    http://help.sap.com/saphelp_xmii115/helpdata/en/Applet_Reference_Details/ParameterReference.htm#Number Formatting
    #,##0 should provide you with a comma as the thousands separator for all numbers in this column of your iGrid.

  • Year values are displaying with comma ex: 2,013

    Hi,
    We are Using OBIEE 11.1.1.7.0 , In the time dimension hierarchy, the year values are displaying in the reports with comma separator i,e.,  2,013
    I want to remove the Comma in the year value of hierarchy.
    Could you please help me anyone to achieve this.
    Thanks,
    Babu.

    unset the set the comma separator for thousand using column properties->Data format and then save it for system wide.
    if helps mark
    ~ http://cool-bi.com

  • Display results seperated by comma's

    Hi
    Just wondering if there was a way to display results from seperate rows in one text box where the results are seperated by comma's?
    =First(Fields!ClientId.Value, "DataSet1")
    The example above will just show one ClientId however I would like to list all of them all like below
    C001,C002,C546,F546,H232
    Am I after Lookup/LookupSet?
    Any help appreciated.
    Cheers
    Cheers Chris

    One method is to create a hidden parameter ,make it allow Multiple values and set its default value to be same as dataset field value. Then you can simply use
    =Join(Parameters!ParameterName.value,",")
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Display a number with commas

    Here's a way to display a number with commas. See attached
    code.
    I had searched here for help on how to do it, and couldn't
    find anything. So, then I wrote this. I'm a hack, self-taught
    coder, so there may be a more eloquent way, but this does
    work.

    Nice, I'm always happy to be humbled.
    One more point. If you're going ot use a return statement I
    like to keep it
    at the very end of the function. So, in a conditional
    statement, setting a
    local variable to the value to be returned allows you to
    return that local
    variable and always keep the return statement as the last
    line. It just
    saves a little searching around for returns in longer
    functions. Just a
    style choice not necessarily better.
    Craig Wollman
    Word of Mouth Productions
    phone 212 928 9581
    fax 212 928 9582
    159-00 Riverside Drive West #5H-70
    NY, NY 10032
    www.wordofmouthpros.com
    "duckets" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    FasterPastor
    > I had searched here for help on how to do it, and
    couldn't find
    > anything.
    >
    > You should have asked! here's one I have had sitting
    around for a while.
    > (code
    > attached below). It handles lots of cases which the
    other handlers posted
    > so
    > far do not. Specifically:
    >
    > Negative numbers - input: -123456
    > - craig's: -,123,456
    > - dougs's: -,123,456
    > - mikes's: -,123,456
    > - duck's: -123,456
    >
    > Floating point numbers - input: pi
    > - craig's: 3
    > - dougs's: 3
    > - mikes's: 3.1,416
    > - duck's: 3.1416
    >
    > Numbers larger than the maxinteger - input: 149668992000
    > - craig's: -,654,863,360
    > - dougs's: -,654,863,360
    > - mikes's: 14,966,899,200,0.0,000
    > - duck's: 149,668,992,000
    >
    > Negative floats - input: -123456.7890
    > - craig's: -,123,457
    > - dougs's: -,123,457
    > - mikes's: -12,345,6.7,890
    > - duck's: -123,456.789
    >
    > Floats larger than the maxinteger - input:
    2233445566.7788
    > - craig's: -2,061,521,729
    > - dougs's: -2,061,521,729
    > - mikes's: 223,344,556,6.7,788
    > - duck's: 2,233,445,566.7788
    >
    > Yes.. the code is longer, but if you want to print
    something like the
    > distance
    > in meters to the sun, you need to handle floats
    properly!
    >
    > enjoy ;-)
    >
    > - Ben
    >
    >
    >
    > on stringNumber n
    >
    > outputString = ""
    > inputString = string(n)
    >
    > if inputString.char[1] = "-" then
    > negative = true
    > delete inputString.char[1]
    > else
    > negative = false
    > end if
    >
    > fraction = ""
    >
    > if inputString contains "e" then
    >
    > mantissa = inputString.char[1..(offset("e",
    inputString)-1)]
    > exponent = value(inputString.char[(offset("e",
    > inputString)+1)..inputString.length])
    >
    > decimalChar = mantissa.char[2]
    > mantissa = mantissa.char[1] &
    mantissa.char[3..mantissa.length]
    >
    > if mantissa.length < exponent+1 then
    > plainNumber = mantissa
    > repeat while plainNumber.length < exponent+1
    > put "0" after plainNumber
    > end repeat
    > else
    > plainNumber = mantissa.char[1..(exponent+1)]
    > fraction = mantissa.char[(exponent+2)..mantissa.length]
    > end if
    >
    > else
    >
    > if offset(".", inputString)>0 then
    > decimalChar = "."
    > end if
    > if offset(",", inputString)>0 then
    > decimalChar = ","
    > end if
    >
    > if offset(decimalChar, inputString)>0 then
    > plainNumber = inputString.char[1..(offset(decimalChar,
    > inputString)-1)]
    > fraction = inputString.char[(offset(decimalChar,
    > inputString)+1)..inputString.length]
    > else
    > plainNumber = inputString
    > fraction = ""
    > decimalChar = string(1.2).char[2]
    > end if
    >
    > end if
    >
    > if decimalChar = "." then
    > separatorChar = ","
    > else
    > separatorChar = "."
    > end if
    >
    >
    > repeat while plainNumber.char[1] = "0"
    > delete plainNumber.char[1]
    > end repeat
    >
    >
    > repeat while plainNumber.length > 0
    > if plainNumber.length > 3 then
    > nextDigits =
    >
    separatorChar&plainNumber.char[plainNumber.length-2..plainNumber.length]
    > delete
    plainNumber.char[plainNumber.length-2..plainNumber.length]
    > else
    > nextDigits = plainNumber
    > plainNumber = ""
    > end if
    > put nextDigits before outputString
    > end repeat
    >
    > repeat while fraction.char[fraction.length] = "0"
    > delete fraction.char[fraction.length]
    > end repeat
    >
    > if fraction.length > 0 then
    > put decimalChar&fraction after outputString
    > end if
    >
    >
    > if negative then
    > put "-" before outputString
    > end if
    >
    > return outputString
    >
    > end
    >

  • Wrong email display name with german umlauts (MS Exchange 2003)

    We use 6 iPhones with Exchange 2003 and get wrong email display names with german umlauts (ä,ü,ö) - but the email-body is right.
    We get special characters instead of umlauts, so the display name split into pieces. Anwering is not posipble - we get a failure-message.
    We changed the standard-internet-mailformat on the exchange-server to unicode utf-8. First it works fine, after a few hours the names displays wrong again.
    So we use this hotfix:
    http://support.microsoft.com/?scid=kb%3Ben-us%3B916299&x=11&y=13
    Same result: First it works fine, after a few hours the names displays wrong again at the iPhone.
    Any ideas?

    Do you have commas in the display name? We used to have "Müller, Thomas" <[email protected]> and then got the split up and special characters you mention. Tests have shown that when leaving out the comma in the display name, e.g. "Thomas Müller" <[email protected]>, everything worked fine.
    Guess it's a question of whether a company wants to change its naming convention for a few iPhone users...
    HCD

  • Display results as String: dosen't work based on the example

    Hello,
    To understand how to display results as string, I tried to reproduce this:
    [http://apex.oracle.com/pls/otn/f?p=31517:84|http://apex.oracle.com/pls/otn/f?p=31517:84]
    I have my table emp
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7839  KING PRESIDENT -  81-11-17 5000 -  10
    7698 BLAKE MANAGER 7839 81-05-01 2850 -  30
    7782 CLARK MANAGER 7839 81-06-09 2450 -  10
    7566 JONES MANAGER 7839 81-04-02 2975 -  20
    7788 SCOTT ANALYST 7566 82-12-09 3000 -  20
    7902 FORD ANALYST 7566 81-12-03 3000 -  20
    7369 SMITH CLERK 7902 80-12-17 800 -  20
    7499 ALLEN SALESMAN 7698 81-02-20 1600 300 30
    7521 WARD SALESMAN 7698 81-02-22 1250 500 30
    7654 MARTIN SALESMAN 7698 81-09-28 1250 1400 30
    7844 TURNER SALESMAN 7698 81-09-08 1500 0 30
    7876 ADAMS CLERK 7788 83-01-12 1100 -  20
    7900 JAMES CLERK 7698 81-12-03 950 -  30
    7934 MILLER CLERK 7782 82-01-23 1300 -  10 I created with the wizard, on my page, a new REPORT REGION
    - selected SQL RESULT -
    - Name: Test
    - Region Source Type: SQL Query
    - Region Template: Report Region
    IN Enter SQL Query or PL/SQL function returning a SQL Query, I COPY-PASTE the following code from [http://apex.oracle.com/pls/otn/f?p=31517:84|http://apex.oracle.com/pls/otn/f?p=31517:84]
    DECLARE
       p_vc_arr2   htmldb_application_global.vc_arr2;
       p_string    VARCHAR2 (2000);
    BEGIN
       SELECT ename
       BULK COLLECT INTO p_vc_arr2
         FROM emp
        WHERE deptno = :p84_select_deptno;
       p_string :=
         HTMLDB_UTIL.table_to_string (p_vc_arr2, ':');
       HTP.p (p_string);
    END;AND I have this error:
    +1 error has occurred+
    Invalid query, no select statement found
    Is not a PL/SQP functiion??
    What do I do wrong?
    thanks,
    Roseline Paquin
    Montreal, Canada

    1 error has occurred
    Invalid query, no select statement foundWhat if you try
    DECLARE
       p_vc_arr2   htmldb_application_global.vc_arr2;
       p_string    VARCHAR2 (2000);
    BEGIN
       SELECT ename
       BULK COLLECT INTO p_vc_arr2
         FROM emp
        WHERE deptno = :p84_select_deptno;
        return 'select ''' ||  HTMLDB_UTIL.table_to_string (p_vc_arr2, ':') || ''' str from dual';
    END;??

  • Display Issues with mini (Mid 2010) and LG L246WP

    I recently purchased a new mini (Mid 2010 base model) and planned to use it with my 24" LG L246WP monitor, which is about 3 years old. The monitor has VGA, component, and HDMI inputs.
    I used an HDMI-to-HDMI cable to connect the mini directly to the monitor, and the output is completely messed up. The mini recognized the monitor (titling the System Preferences > Display dialog with 'L246WP') and set it to the monitor's native resolution of 1920x1200, but on the monitor the image is cropped to what looks like a 4:3 aspect ratio and with part of the image shifted up and left so I cannot view the top menu bar or the left hand side of the desktop. The monitor's on-screen display shows 1080p in this mode.
    The Display dialog also gives me an option for 1080p. I can select this and use the Underscan slider to resize the desktop output to fit on the screen, but it is still shifted left and must be resized smaller than the available display space (plus the total image is only 1080 pixels, not using the monitor's full native screen). In this mode, 1080p also shows on the monitor's on-screen display.
    I tried 1024x768 to see if I could get a properly-positioned image, but the desktop was shifted just like in the 1920x1200 case and the monitor's on-screen display status still reported 1080p.
    The monitor has a menu setting under an HDMI heading with "Video" and "PC" options, but changing this selection does not make a difference.
    Since the monitor came out before HDMI was as widespread as it is today, it came with a DVI-to-HDMI cable, so I also tried using that cable with the HDMI-to-DVI adapter that came with the mini, but this did not make a difference either.
    To prove it wasn't the HDMI cable, I connected the mini to my Samsung 6300 series 40" LED HDTV and with some tweaking of the Underscan slider the displayed image filled the screen perfectly.
    I've searched the Internet and various forum threads (i.e. http://hardforum.com/showthread.php?t=1167222&page=63) seem to indicate this monitor can send a corrupted EDID that causes issues, especially with nVidia graphics drivers. On Windows you can use registry or driver hacks to override the EDID with the correct values, but on OS X this doesn't seem possible (I was hoping for a Terminal one-liner but it seems this doesn't exist). I have seen some mentions of the shareware SwitchResX (http://www.madrau.com), which looks like it gives you the option to override resolution settings, but I haven't tried this yet.
    It also appears to me that the monitor is always interpreting the signal (or the mini is always sending the signal) as 1080p, even if I've set 1920x1200 in the Display dialog. I don't know if this is a defect in the monitor where it always assumes the HDMI input is a 1080p source (previous I used it with an Xbox 360 with no issues but that was 1080p HDMI), or if is a bug in the graphics drivers (or at least a lack of flexibility / miscommunication to the user trying to handle a corrupt EDID).
    I asked my local Genius Bar for advice today (without bringing any hardware in) but was not told anything I didn't already know.
    I'm trying to determine the best way to work through this issue. *My questions are:*
    Would it make any difference if I used a Mini DisplayPort-to-DVI adapter (and then my DVI-to-HDMI cable to the monitor's HDMI input)?
    What about a Mini DisplayPort-to-VGA adapter? In the past I used a 12" Powerbook (via a mini-DVI-to-VGA adapter) with this monitor and had no display issues like this, but I'd prefer to stick with a digital connection on my brand new mini.
    Is SwitchResX the only practical way in OS X to override a corrupt EDID and force the mini to output a certain resolution?
    Besides the various adapters and SwitchResX, is there anything else I should try before buying a new monitor?

    Hello EPWilson4984.
    I have been experiencing the same issues you described. Connecting my brand new Mac Mini to my Westinghouse 24”monitor (L2410NM,  1920x1200 pixel resolution) produces a very fuzzy and washed out image quality. The Mac recognizes the monitor and applies the right resolution (1920x1200), but it looks just awful. The EDID info is definitely not right.
    Now, I tried your suggestion (DVI-to-HDMI), and similar suggestions from other threads, but nothing works. Nothing seems to work at all.
    The main input for the monitor is HDMI, so whatever cable I use, in the end always has to connect to the monitor via HDMI. I tried all these combinations with zero success:
    Mac mini -> HDMI cable -> monitor (result: fuzzy and blurry image)
    Mac mini -> displayport –HDMI adapter-> HDMI cable -> monitor (result: fuzzy and blurry image)
    Mac mini  -> displayport –DVI adapter-> DVI-to-HDMI cable -> monitor (result: it gives me a blank screen, no image at all)
    I’m running out of options. Don’t know what to do. The 24” monitor produces beautiful, crisp images when hooked to my Windows 7 PC. It looks horrible when connected to my brand new Mac Mini.
    Any alternatives you may have come across? Please let me know, thank you.

  • How to create a String with comma ?

    Hi All,
    I have a table with 10 records(employee name) and i have to make a string
    with comma delimiter and at the end with "."
    Can anybody tell me how to write a Java program for this ?
    Thanks in advance.

    // I believe the following example gives you the answer.
    class stringEG {
         public static void main(String args[]) {
         String emprs[] ={"1","2","3","4","5","6","7","8","9","10"};
         String vempname = "";
         for(int i=0; i<emprs.length; i++) {
         if(i == (emprs.length-1))
              vempname = vempname + emprs[i] + ".";
         else
              vempname = vempname + emprs[i] + ", ";
         System.out.println("vempname : "+vempname);
    Here dont assume that I asked you to get all the results and putting
    it into the string arrays. But its a simple example to suit your requirement.
    The half-way coding below answers your question, I hope.
    vempname = "";
    while (emprs.next()) {
    if(emprs.isLast())
    vempname = vempname + emprs.getString("empname") + ".";
    else
    vempname = vempname + emprs.getString("empname") + ", ";
    // nats.

  • Display results of MySQL query from AMFPHP by ArrayCollection in AS3 (Flash CS4)

    Hi, i am using Flash CS4 (AS3) + AMFPHP + MySQL to do own flash frontend for Wordpress CMS.  Everything is going fine but i`ve got one problem. Problem with properly display of result of query in AS3 by using ArrayCollection.
    When i check my service in "amfphp/browser/" in web browser i`ve got this (with all needed data):
    (mx.collections::ArrayCollection)#0
    filterFunction = (null)
    length = 2
    list = (mx.collections::ArrayList)#1  
    length = 2     source = (Array)#2
    That is the reason that i suppose that service work fine.  Problem is when i try to display result in AS3. In actionscript i have got this:
    function getNewsListHandler(result:Object):void{
    trace(result);
    This function displays: [object Object].
    I know that "result" is an ArrayCollection type but i don`t know how to get rows and columns from this. I know that my data is there but i have no idea how to get it.
    Clarify: I don`t know how to get to Arrays and simple data variables which are in ArrayCollection.
    Could anyone help me with that problem. I would be gratefull
    P.S. I tried also change query type in service.PHP for mysql_fetch_query but in that case i`ve got only one row (not all data).

    Thanks for fast reply,
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"});
    you would get the data like
    var resultstr:String = arr_coll[1][1].col2;
    trace(resultstr);
    //results in data4
    could you explain me how it was happen (arr_coll[1][1].col2)? It`s not clear to me. I thought in this case rather something like this :
    var resultstr:String = arr_coll[1]['col2'];
    It should give me "data4". I know it wasn`t but i don`t understand ArrayCollection in level which is needed to use your advice in my case. Could you clarify "arr_coll[1][1].col2" a bit?
    What would it look like when you would have something like this:
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"},{col1:"data5",col2:"data6"},{col1:"data7",col2:"data8"});
    and you would want know f.e. position in ArrayCollection of  "data6". How would you code this? arr_coll[1][2].col2?

Maybe you are looking for

  • Down payment issue against sales order

    Hi I have some down payment of 100000 and it is to be executed in 20 parts against a sales order. there was some error in the payment processing and while debugging we have posted some five of above payments as cleared although there was no clearing

  • Edit Multiple Images in photoshop cs5

    I am trying to apply the same affects thru a action to about 50 some odd photos. I don't want to go thru them individually so how do you do them all at once? Can you convert them to smart objects then apply the action? I tried this but once i want to

  • Display Issues, Mac Mini and Sony LCD TV

    Hi, First my setup: Mac Mini(Core2Duo) = DVI2HDMI = Pioneer ASX2 = Sony Bravia 40W2000 I have two issues, in order of importance: Issue #1: When switching off the Pioneer my Mac Mini will suspend. This is not wanted, because I somethimes want it to e

  • File Adapter Service debatching issue

    I am experimenting with the ESB to enable an inbound file adapter to read multiple records "debatching" from a file with XML content. I am using a router to pass to another FileAdapter for writing each of the child records to a separate XML file. So

  • Apple ID - Log in

    Out of the blue I got problems with my Mac Mini running on Mac OS X 10.4.8 and the Firefox browser: The font size has become miniscule but will change with a manual increase under View. Next my usual Apple ID is not recognized using my usual pass wor