Formatting output for a query

Hi,
I wanted to get my output to show a table with each record on each line. Instead, I get a record shown on multiple lines. Can anyone tell me how to format so a record would show on one line?
It currently shows this:
SQL> select empno, userid, mgrno, fname, lname from emp;
EMPNO USERID MGRNO FNAME
LNAME
44 4 27 Mark
Jenkins
19 5 44 Jim
Scott
13 1 44 David
Stone
I want to format it to display like this:
SQL> select empno, userid, mgrno, fname, lname from emp;
EMPNO USERID MGRNO FNAME LNAME
44 4 27 Mark Jenkins
19 5 44 Jim Scott
13 1 44 David Stone
Thanks in advance.
Sincerely,
Nikhil Kulkarni

type 'set linesize 500' (or however long your max record is
you can also type "set trimspool on" to not have lots of whitespace at the ends of lines

Similar Messages

  • Formatting output display of query designer 7.0

    Hi,
    I have just switched over to Query Designer 7.0 from 3.5. The output of a query shows only 4 columns as against almost a full page of columns in the previous version. Is there a way to increase the default number of columns displayed?
    Thanks

    Hi,
    do you see less rows in your query or BEx workbook?
    Try this:
    Open BEx Analyzer and Open BEx Query Designer. Choose in Query designer your querie and press "Exit and use querie" -> The querie is executed in BEx Analyzer with a default workbook. If there are not all rows displayed like in query definition u may have zero suppression for rows activated. This means if there are no values in one row its simply not displayed. -> Disable it in Querie properties tab rows/lines.
    2nd way:
    Another cause could be that u have to refresh Dataprovider in Analysis grid on BEx Analyzer.
    Go to Design mode (press icon with Capital A in BEx Toolbar)-> right click on Analysis grid (table) -> properties-> Change Dataprovider-> click on button"assign query"-> choose your query and save.
    Hope it helps
    Regards

  • Results showing the same output for any query execution

    Guru's
    Whenever user selects  query in RSRT --> and click on java view it is prompting for user ID and password. After giving the login credentials, the out put remains the same for any query query as input. Please let me know how can we fix this? THis is occuring for only one user. Even I tried copying the user to a new user. THe new user is not facing this problem.
    Regards,
    Suresh

    try clearing the portal cache then try it. ask somebody else to log in and try it, could be authorization.

  • Formating output of a query for tracing

    Hi,
    This is for 10.2.0.4 on IBM AIX 6.1
    I need to generate traces for some sessions by setting the event 10046. I want to generate an SQL script for doing this which will be as follows.
    SQL> oradebug setorapid 20
    SQL> oradebug unlimit
    SQL> oradebug Event 10046 trace name context forever, level 12
    SQL> oradebug setorapid 100
    SQL> oradebug unlimit
    SQL> oradebug Event 10046 trace name context forever, level 12
    SQL> oradebug setorapid 210
    SQL> oradebug unlimit
    SQL> oradebug Event 10046 trace name context forever, level 12 In this example, you see only three sessions but actually i have a lot of session and that is why i need to have a script.
    I have following query which i can use to get the PID of a session which i would be tracing.
    select a.pid
    from v$process a, v$session b
    where a.addr=b.paddr and a.username is not null ;Can anyone help to tell me how to generate a script for doing this. I tried to do following but formatting is not correct. I want above three trace commands in a sequence for every PID in my script.
    select
    'oradebug setorapid '||b.pid||'                                   '||
    'oradebug unlimit                                                 '||
    'oradebug Event 10046 trace name context forever, level 12        '||
    'oradebug tracefile_name                                          '
    from v$session a, v$process b where a.username is not null and a.paddr=b.addr order by b.spid;Salman

    Hi, Salman,
    You're writing one line of output per file.
    If you want to write 4 lines per file, add newline characters (CHR(10) on my system; may be different on yours) between the lines, like this:
    select    'oradebug setorapid ' || p.pid                     || CHR (10) ||
           'oradebug unlimit'                              || CHR (10) ||
           'oradebug Event 10046 trace name context forever, level 12'     || CHR (10) ||
           'oradebug tracefile_name                                          '
    from        v$session      s,
           v$process      p
    where        s.username      is not null
    and        s.paddr     = p.addr
    order by  p.spid;Why use meaningless table aliases like a and b?
    Why not use something that reminds you which table is which, and helps prevent mistakes; something like p for v$process and s for v$session?

  • Output for the query

    Find all employees who have the same salary. Display emp1, emp2, ...and credit_limit.

    Hi,
    user13417896 wrote:
    Find all employees who have the same salary. Display emp1, emp2, ...and credit_limit.Are emp1 and emp2 the id numbers of two employees who have the same salary? Does this mean you want to show them side-by-side on the same output row?
    If so, you probably want a self-join. Imagine that the employees with lower ids were in one table, and the employees with higher id2 were in another table. You might join the two tables like this:
    FROM   employee_lower     l
    JOIN   employee_higher     h  ON     l.salary   = h.salaryIn your case, both table are the same employee table, and to make sure that the id from the one you'll call l is lower than the id from the one you'll call h, you need a compound join condition, that is, two things must both be true for rows to be considered related:
    (1) the salaries must be the same (as above), AND
    (2) l.id must be lower that h.id
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Post your best attempt at a query, and say specifically what the problem with that query is.
    If you're getting an error message, post the complete error message, including line number.
    What output do you want if 3 (or more) employees all have the same salary?

  • Expected output  for my sql query

    Hi can you please tell me how to get the my expected output from the table work_invoice_hold_t
    where i need to compare company code , tot_cust_no,sto_no,sales_date and trans_type='HOLD'
    for example below i am comparing comp_code 1801 ,tot_cust_no,sto_no and sales_date.... when i compare them i need to get sales date record like
    1801     1504522002      601     120618     1     142          HOLD      Y
    COMP_CODE   TOT_CUST_NO     STO_NO   SALES_DATE   CASH_NO    RECEIPT_NO   TRANS_TYPE  PROCESSED
    2300                  0062090790                121     120306                  3              132                       HOLD                 Y
    1801                  1504522002                601     120306            1              142                        HOLD                 Y
    1801                  1504522002                601     120306            1              142               UNHOLD        3
    1801                  1504522002                 601     120618            1              142                       HOLD           Y
    EXPECTED OUTPUT:
    2300                  0062090790                121     120306                  3              132                       HOLD                 Y
    1801                  1504522002                 601     120618            1              142                       HOLD           Y

    Hi Thank you for providing the necessary help.
    Here is another requirement for my query.
    First query should be merged into second query. In the second query we are using one more table like "I_INVOICE_INFO_T_LOG_V"
    that is when we put both first and second queries together i need to get the output like below:
    601     STO     1504522002     120618     142     1     1801     HOLD
    121     STO     0062090790     120306     132     3     2300     HOLD
    table structure is:
    CREATE TABLE RIMS.I_INVOICE_INFO_T_LOG_V
    REG_DATE VARCHAR2(6 BYTE),
    STO_NO VARCHAR2(3 BYTE),
    SALES_DATE VARCHAR2(6 BYTE),
    CASH_NO NUMBER(5),
    RECEIPT_NO NUMBER(10),
    ORDER_NO NUMBER(10),
    TOT_CUST_NO VARCHAR2(13 BYTE),
    CONTROL_NO NUMBER(10),
    INV_ADM_COST_FR VARCHAR2(1 BYTE),
    VAT_OBLIGED VARCHAR2(1 BYTE),
    ART_NO VARCHAR2(8 BYTE),
    SOLD_QTY NUMBER(10),
    SOLD_AMOUNT NUMBER(10),
    CUR_CODE VARCHAR2(3 BYTE),
    ORIG_INVO VARCHAR2(10 BYTE),
    CUSDEL_NO NUMBER(2),
    SEQ_NO_SORT NUMBER(10),
    GROUP_ID_PROD NUMBER(10),
    GROUP_ID_TXT NUMBER(10),
    CUSDEL_TYPE VARCHAR2(2 BYTE),
    VAT_CODE VARCHAR2(10 BYTE),
    VAT_RATE NUMBER(6,2),
    TIMESTAMP DATE,
    INV_TYPE VARCHAR2(1 BYTE),
    INS_USER VARCHAR2(30 BYTE),
    MACHINE VARCHAR2(64 BYTE),
    SEQ NUMBER(22) NOT NULL
    sample data :
    SET DEFINE OFF;
    Insert into RIMS.I_INVOICE_INFO_T_LOG_V
    (REG_DATE, STO_NO, SALES_DATE, CASH_NO, RECEIPT_NO, ORDER_NO, TOT_CUST_NO, CONTROL_NO, INV_ADM_COST_FR, VAT_OBLIGED, ART_NO, SOLD_QTY, SOLD_AMOUNT, CUR_CODE, CUSDEL_NO, SEQ_NO_SORT, GROUP_ID_PROD, CUSDEL_TYPE, VAT_CODE, VAT_RATE, TIMESTAMP, SEQ)
    Values
    ('120306', '121', '120306', 3, 132,
    0, ' 0062090790', 0, '0', '1',
    '40043234', 8, 20800, 'DKK',
    0, 0, 0, '01',
    '0', 2500, TO_DATE('10/21/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 916052);
    Insert into RIMS.I_INVOICE_INFO_T_LOG_V
    (REG_DATE, STO_NO, SALES_DATE, CASH_NO, RECEIPT_NO, ORDER_NO, TOT_CUST_NO, CONTROL_NO, INV_ADM_COST_FR, VAT_OBLIGED, ART_NO, SOLD_QTY, SOLD_AMOUNT, CUR_CODE, CUSDEL_NO, SEQ_NO_SORT, GROUP_ID_PROD, CUSDEL_TYPE, VAT_CODE, VAT_RATE, TIMESTAMP, SEQ)
    Values
    ('120306', '601', '120306', 1, 142,
    0, ' 1504522002', 0, '0', '1',
    '40047760', 2, 200, 'GBP',
    0, 0, 0, '01',
    '0', 1750, TO_DATE('10/21/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 916053);
    Insert into RIMS.I_INVOICE_INFO_T_LOG_V
    (REG_DATE, STO_NO, SALES_DATE, CASH_NO, RECEIPT_NO, ORDER_NO, TOT_CUST_NO, CONTROL_NO, INV_ADM_COST_FR, VAT_OBLIGED, ART_NO, SOLD_QTY, SOLD_AMOUNT, CUR_CODE, CUSDEL_NO, SEQ_NO_SORT, GROUP_ID_PROD, CUSDEL_TYPE, VAT_CODE, VAT_RATE, TIMESTAMP, SEQ)
    Values
    ('120618', '601', '120618', 1, 142,
    0, ' 1504522002', 0, '0', '1',
    '20057057', 2, 400, 'GBP',
    0, 0, 0, '01',
    '0', 1500, TO_DATE('10/21/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 916054);
    Insert into RIMS.I_INVOICE_INFO_T_LOG_V
    (REG_DATE, STO_NO, SALES_DATE, CASH_NO, RECEIPT_NO, ORDER_NO, TOT_CUST_NO, CONTROL_NO, INV_ADM_COST_FR, VAT_OBLIGED, ART_NO, SOLD_QTY, SOLD_AMOUNT, CUR_CODE, CUSDEL_NO, SEQ_NO_SORT, GROUP_ID_PROD, VAT_CODE, VAT_RATE, TIMESTAMP, SEQ)
    Values
    ('051020', '262', '051020', 11, 16,
    0, ' 1555792009', 0, '0', '1',
    '50043993', 3, 4800, 'GBP',
    0, 0, 0,
    '0', 1750, TO_DATE('10/21/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 916055);
    for example:
    Second query
    SELECT DISTINCT workhold.sto_no AS bu_code,
    'STO' AS Bu_Type,
    AND workhold.processed='Y'...
    and ( first query condition)
    First query.
    WITH  got_cnt        AS
        SELECT  w.*    -- or list columns you want
        ,    COUNT (CASE WHEN trans_type = 'HOLD' THEN 1 END)
                OVER (PARTITION BY  comp_code, tot_cust_no, sales_date)
                    AS  hold_cnt
        ,    COUNT (CASE WHEN trans_type = 'UNHOLD' THEN 1 END)
                OVER (PARTITION BY  comp_code, tot_cust_no, sales_date)
                    AS  unhold_cnt
        FROM    work_invoice_hold_t  w
    SELECT sto_no as bu_code,'STO' as bu_type,tot_cust_no as cust_no,sales_date,receipt_no,cash_no as till_no,comp_code,trans_type-- or list columns you want
    FROM    got_cnt
    WHERE    hold_cnt    = 0
    OR    unhold_cnt    = 0
    First query output:
    601     STO     1504522002     120618     142     1     1801     HOLD
    121     STO     0062090790     120306     132     3     2300     HOLD
    Second Query:
    SELECT DISTINCT workhold.sto_no AS bu_code,
                               'STO' AS Bu_Type,
                               workhold.Tot_Cust_No AS Cust_No,
                               workhold.Sales_Date AS Sales_Date,
                               workhold.Receipt_No,
                               workHOLD.Cash_No AS Till_No,
                               workhold.Comp_Code,
                               workhold.Trans_Type AS on_hold_flag
                 FROM WORK_INVOICE_HOLD_V workhold,
                           I_INVOICE_INFO_T_LOG_V invlog
                WHERE
                TRIM (workhold.Tot_Cust_No) = TRIM (invlog.Tot_Cust_No)
                      AND TRIM (workhold.Cash_No) = TRIM (invlog.Cash_No)
                      AND TRIM (workhold.sales_date) = TRIM (invlog.sales_date)
                      AND TRIM (workhold.Receipt_No) = TRIM (invlog.Receipt_No)
                      AND TRIM (workhold.Sto_No) = TRIM (invlog.Sto_No)
                      AND workhold.processed='Y'
    output for second query:
    601     STO     1504522002     120618     142     1     1801     HOLD
    601     STO     1504522002     120306     142     1     1801     HOLD
    121     STO     0062090790     120306     132     3     2300     HOLD
    expected output:
    after checking the conditions for both 1 and 2 queries i need to get the output like below.
    601 STO 1504522002 120618 142 1 1801 HOLD
    121 STO 0062090790 120306 132 3 2300 HOLDEdited by: 891933 on Oct 2, 2012 1:18 AM

  • Cfreport  ("HTML format") missing columns for a query

    Using Linux Fedora, ColdFusion 8 Developer Edition.
    Problem:
    The command:
    <cfreport
    format="HTML"
    template="ReportTemplateHtml.cfr"
    filename="Report.html"
    overwrite="yes"
    query=#structReport.query#
    >
    With Format equal to PDF or RTF, which is correct output:
    "item" "Description" "Qty" "Unit Price" "Extension"
    The HTML output writes the following columns:
    "item" "" "" "Unit Price" "Extension"
    The "Description" and "Qty" are missing.
    Any ideas as to why data is missing from HTML report?
    The html output for the table is as follows:
    <tr valign="top">
    <td style="width: 18px; height: 18px;"></td>
    <td colspan="3" style="background-color: #EDE9C6;
    border-top-style: solid; border-top-width: 1px; border-top-color:
    #000000; padding-top: 1px; border-left-style: solid;
    border-left-width: 1px; border-left-color: #000000; padding-left:
    3px; border-bottom-style: solid; border-bottom-width: 1px;
    border-bottom-color: #000000; padding-bottom: 1px;
    border-right-style: solid; border-right-width: 1px;
    border-right-color: #000000; padding-right: 3px; "><span
    style="font-family: Helvetica; background-color: #EDE9C6;
    font-size: 10.0pt; font-weight:
    bold;">Item</span></td>
    <td colspan="6" style="width: 273px; height:
    18px;"></td>
    <td colspan="3" style="background-color: #EDE9C6;
    border-top-style: solid; border-top-width: 1px; border-top-color:
    #000000; padding-top: 1px; border-left-style: solid;
    border-left-width: 1px; border-left-color: #000000; padding-left:
    3px; border-bottom-style: solid; border-bottom-width: 1px;
    border-bottom-color: #000000; padding-bottom: 1px;
    border-right-style: solid; border-right-width: 1px;
    border-right-color: #000000; padding-right: 3px; "><span
    style="font-family: Helvetica; background-color: #EDE9C6;
    font-size: 10.0pt; font-weight: bold;">Unit
    Price</span></td>
    <td colspan="3" style="background-color: #EDE9C6;
    border-top-style: solid; border-top-width: 1px; border-top-color:
    #000000; padding-top: 1px; border-left-style: solid;
    border-left-width: 1px; border-left-color: #000000; padding-left:
    3px; border-bottom-style: solid; border-bottom-width: 1px;
    border-bottom-color: #000000; padding-bottom: 1px;
    border-right-style: solid; border-right-width: 1px;
    border-right-color: #000000; padding-right: 3px; "><span
    style="font-family: Helvetica; background-color: #EDE9C6;
    font-size: 10.0pt; font-weight:
    bold;">Extension</span></td>
    <td style="width: 19px; height: 18px;"></td>
    </tr>

    Query Builder is a crutch tool. Small, lightweight, but limited. It does not have every inline function you see in the SQL reference guide. If you need more, then you have to do more on your own.

  • How to use output of one query as an input for another

    Hi Gurus,
    can you give me any links on how to use an output of one query as an input for another (preferably if this can be done in a dynamic/on the fly way)?
    thanks

    You can use Replacement Path Variable for this purpose. See this detailed documentation.
    http://help.sap.com/saphelp_nw04s/helpdata/en/bd/589b3c494d8e15e10000000a114084/content.htm
    Abhijit
    Edited by: ABHIJIT TEMBHEKAR on Nov 19, 2008 9:48 AM

  • Creating Format type for printing ALV output.

    Dear Friends,
        I am using a format type for printing ALV output print which displays 65 rows and 255 columns on DINA4 page. I want to create a format type which will print 65 rows and 310 columns on 'LEGAL' page format .
    So plz suggest the ways along with help links if any.
    Regards,
    Madan.

    Hi Mandan,
    As long as I know the maximum column for printing is 255.
    Might be you can split your output into 2 rows...
    Regards,

  • Query regarding Name format page for Portugal

    Hi All,
    We are PeopleTools 8.50 and Peoplesoft HRMS Application 9.0. We have implemented the e recruit module for different countries and I would like to know if a delivered name format page exists for Portugal such as NAME_PRT_SEC because I do not find it in the NAME_FORMAT_TBL or in my Application Designer. I can find such a corresponding name format page for every other country but not for Portugal.
    We would need this information as our client wants the name formats to be displayed in Portuguese format when the user logs in Portuguese Portal.
    Thanks in Advance for the information.

    Amit,
    Get your date in this format in XML.
    YYYY-MM-DDThh:mm:ss+HH:MM
    Then there are lot of functions, you can apply on this to get the formatted date you wanted.

  • No output for XML Publisher Report using CASE/DECODE in Where Clause

    Hi,
    I've a business requirement to modify an existing report which has two input parameters,
    -> p_statcode (Closed Status) which can have values 'Y' or 'N'
    -> p_overdue (Overdue Flag) which can have values 'Y' or 'N'
    The Overdue Flag is an evaluated column having values of Y/N and it is evaluated as follows,
    ONTF_MOD_VAL(NVL (
                                         (TRUNC (SYSDATE)
                                          - (TO_DATE (oe_order_lines.attribute18,
                                                      'DD-MON-RRRR')
                                             + TO_NUMBER (fnd_lookup_values.meaning))),
                                         0
                            overdue_flagThe user requirement now is they needs to be a third option for parameter p_overdue called ALL,
    passing which the output should include records having
    p_statcode is Y ELSE p_statcode is N AND p_overdue is Y OR p_overdue is N
    In other words records having both Y and N vlaues for Overdue Flag have to be returned irrespective of the value given to Closed Status.
    Original where clause in the Data Definition file is as follows,
    WHERE Closed_Status = nvl(:p_statcode,Closed_Status)
                       AND overdue_flag = nvl(:p_overdue,overdue_flag)My modified code is as follows,
    WHERE   Closed_Status = NVL (:p_statcode, Closed_Status)
             AND overdue_flag = (CASE
             WHEN :p_overdue = 'Y' THEN 'Y'
             WHEN :p_overdue = 'N' THEN 'N'
             ELSE overdue_flag
             END)
    OR
    WHERE   Closed_Status = NVL (:p_statcode, Closed_Status)
             AND overdue_flag = DECODE (:p_overdue, 'Y', 'Y', 'N', 'N',overdue_flag)Both approaches have the same problem.
    The output is in EXCEL format. The modified query works fine for p_overdue as Y or N but when p_overdue is passed as ALL it returns an empty EXCEL sheet with just the report output column headers.
    Any help as to why this is the case ?? What is wrong in my approach ?
    Regards,
    Vishal

    not clear about p_overdue = ALL
    which values needed for p_overdue = ALL ?
    try smth like
    WHERE   Closed_Status = NVL (:p_statcode, Closed_Status)
    AND (
       overdue_flag = DECODE (:p_overdue, 'Y', 'Y', 'N', 'N',overdue_flag) and :p_overdue != 'ALL'
       or
      :p_overdue = 'ALL' and (overdue_flag = 'Y' or overdue_flag = 'N')
    )for overdue_flag which has more then 'Y', 'N' values
    if overdue_flag only in ('Y','N') then
    WHERE   Closed_Status = NVL (:p_statcode, Closed_Status)
    AND (
       overdue_flag = DECODE (:p_overdue, 'Y', 'Y', 'N', 'N',overdue_flag) and :p_overdue != 'ALL'
       or
      :p_overdue = 'ALL'
    )

  • Output of SQ01 Query to a file in background

    Hello,
           I have created a SQ01 query for a certain specific outpur from my SAP system. I need to get the output of this query to a file. While i have tried executing this report from the frontend; it works smoothly, and based on the variant it creates the output and writes to a file at a remote location. But while i am trying to process the same query using background job, it creates a spool request and doesnt export the data to a file.
           Can someone please help me in getting me right in case i am doing anything wrong.
    Regards,
    V

    Hi,
    SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.
    Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.
    It look exactly like what you see during a spool display.
    Please note that it is not restricted to sapsciprts spool only.  Any reports in the spool can be converted using the program 'RSTXPDFT4'.
    Regards,
    Pavan

  • Xml output of a query

    Hi,
    I want to generate xml output of a query.
    ( suppose if i write select * from tab1 ; then i want all the rows from the table tab1 in xml form )
    how to do it.. ?
    plz guide.

    I guess what you are loooking for is this
    select xmltype(cursor(select * from dept)).getclobval() from dual;
    this will give you the outout in a txt viewable format.
    Rushi

  • Create a Formatted report for a single record

    I am trying to create a report for a single record in a document format instead of row and column format
    For example to list a custome information with list of orders.
    CustomerID ---------------------        Name ------------------------------------
    Address 1 ----------------------         Address 2 ------------------------------
    City --------------------------------        State -------------------------------------
    Zip ---------------------------------
    Order List
    Order 1            Qty          Total Cost
    Order 2            Qty          Total Cost
    We dont have crystal reports setup yet.  I am trying to use report designer...but it is not allowing me to do it.  It creates different group for each row in the query.   Can any one suggest how to do it using report designer or another way in BI 7.0 to create this kind of document.   I want to be able to print this document as pdf or other types.
    Any help is greatly appreciated..
    Thanks

    you can do this both in a formatted report or bex, depending on what kind of an outcome that you are looking for.
    basically, you are first going to present the data in a tabular format and then move the cells around, so the next time you execute the report (analyzer or report designer) it will stay in that format.
    if you are doing it in report designer, first create a query that pulls all required data points and gives them to you in an output as a table.  Then, add that query as a data provider for the formatted report, and you can create additional cells and move the key figures around.  Report designer is a little crude for formatting, but it works
    if you are doing this in BEx Analyzer, then you can do the same thing: create a query and then use the BExGetData formula to pull the required data into required cells
    if you are looking for HIGHLY formatted report (for example you want the output to come out on forms, etc), then you would need to use the Crystal Reports.
    Regardless of what you use for the presentation of the data, the data generation is controlled by the Query itself.  This is one of the tools that SAP is not planning to take away: all the future presentation options will use the query as the data source.
    good luck

  • Formatting output to a file? 1.4.2

    I am writing an application that writes result sets from an oracle 10g database query. This output combines both text and numeric.
    I cannot figure out how to justify the output to the right or left or force the fields to use a set amount of space regardless of the width of the text.
    As a result I get an outfile with perfectly lined up columns except for the one or two where instead of a four digit number there is a single number. This change in width shifts all of the output over.
    My customer goes nuts over this, surely there is a way to format output?

    OK, I tried today, I really did, I just can't get my brain around how to do what I need to accomplish so here is a pseudo example and i am hoping someone can shed some light.
    My application is abstract to enable easy addition of instances of automated reports.
    I have a 2d array that contains the column names for a given query. [0] = column name, [1] = space to be applied after results are added to a string buffer.
    So, something like this:
    StringBuffer entireQueryResults = new StringBuffer();
    String[][] QueryColumns = someObject.getQueryColumnNames();
    ResultSet currResults = someObject.getResultset();
    while(currResults.next()){
    String currRow = "";
    for(int i = 0; i < QueryColumns.length; i++){
       currRow = currRow + currResults.getString(QueryColumns[0])+currResults.getString(QueryColumns[i][1])+"\n";
    entireQueryResults.append(currRow);
    Now, the problem is that there are columns in the queries that have digits, these can range from a single val to 5 and while 98% of them are 3 digits there are random instances where they are a single digit or even a -1. When this happens it throws the output way off and makes it difficult to read in the resulting email report.
    How can I incorporate this into a MessageFormat or ChoiceFormat object to make the output pretty ?

Maybe you are looking for