alignment of the text file column data

Hi all

I want to format the output file as shown in need. Suggestions appreciated. I tried with lpad, rpad in the query. Also tried with justify right in the column after A5 format... (A5 size frame right)

It is part of an important application.

Please suggest.

SQL file

--------

set verify off
Set feedback off
NewPage 0 value
set pagesize 63
set linesize 280
TOPIC ON THE VALUE

coil c:\test.txt.
column heading "CTY" A5 format Change_types

termout off Set

Select CT of
tab;

output in the text file

CTY
-----
N

Power required:

CTY
-----
N

(* See space above)
Oracle 10g
running sqlplus

Thank you

HA!

Hello

G2500 wrote:

Hi all

I want to format the output file as shown in need. Suggestions appreciated. I tried with lpad, rpad in the query. Also tried with justify right in the column after A5 format... (A5 size frame right)

It is part of an important application.

Please suggest.

SQL file

--------

set verify off
Set feedback off
NewPage 0 value
set pagesize 63
set linesize 280
TOPIC ON THE VALUE

coil c:\test.txt.
column heading "CTY" A5 format Change_types

termout off Set

Select CT of
tab;

output in the text file

CTY
-----
N

Power required:

CTY
-----
N

(* See space above)
Oracle 10g
running sqlplus

Thank you

HA!

This sounds like a job for LPAD.  What exactly have you tried?  It is difficult to say what hurts you without knowing what you were doing.

I don't have a copy of your table, so I'll use the scott.dept table to illustrate:

SELECT LPAD (dname, 20) department_name

OF scott.dept

;

Output:

DEPARTMENT_NAME

--------------------

ACCOUNTING

SEARCH

SALES

OPERATIONS

You want to justify the right title, like this

DEPARTMENT_NAME

--------------------

ACCOUNTING

SEARCH

SALES

OPERATIONS

?

If so, make this SQL * more order

Department_name RIGHT-JUSTIFIED COLUMN

before running the query.  COLUMN... JUSTIFICATION applies only to the topic, not the data.

Tags: Database

Similar Questions

  • Writing data in the text file or excel spreadsheet

    Hello

    I have a silly question to ask questions about the writing of data in a text file or a spreadsheet. I have an example that simulates a sine-swept DAQmx. The output it provides is the (amplitude and phase) frequency response function that is plotted on a graph (see VI) attached. I like to use these data for further analysis by transmitting the data to a text file or a spreadsheet. I've tried a few things, but the thread is broken. I guess I use the sink badly - so I was wondering, can you please advise me on what sink should I use?

    Your help would be very appreciated,

    Thank you very much

    REDA

    The wire is broken, because you cannot connect this type of data to one of these two functions. The data source type is a table 1 d of the clusters, where each cluster contains two tables. The text file write accepts strings, not clusters. Writing on a file action accepts dynamic data, and while you can convert dynamic data tables, there is no built-in mechanism to convert a table 1 d of the clusters of two matrices.

    What you need to do is to convert the data in a format which can be accepted by these functions. Since you want to have a "spreadsheet" file then you should use writing to the spreadsheet file that creates a delimited text file. Since the frequency data would be the same for the plot of the magnitude and phase diagrams, you can have 3 columns: frequency, amplitude, and phase. You can take off the items using Unbundle by name, and then create a table 2D of each element of the cluster. The real question is to know if you want to save the data at each iteration and if you simply add on the file. The attached figure shows write an initial header and then adding just streaming the data.

  • Add data at the end of a specific line in the text file

    Hello

    I'm trying to add data at the end of the last 4 lines of the text file attached with the ' table to add.  4 rows (422.5800 entry), I would add the first entry of the 'Array to add' entry, on the 5th line to add the second entry of the 'Add picture' and so on.  How can I do this?

    Any help will be appreciated.

    Sincerely,.

    hiNi.

    After re-reading your post, I think that's what you really want to start adding after the first 4 rows.

  • Odd number of columns in the text file

    Hello everyone

    From an Excel (.xls) file, I saved (tabs-delimited text) file and open in Labview. The file has only 2 columns (apparently), but my VI says he has 12! I tried to find any character 'lost' in the file but it's all in the first two columns.

    However, if I open the .xls file, save the text file delimited tab, open this tab delimited text file using excel, hit save and then open in my VI, the VI will tell me that the file has only 2 columns. Strange.

    Enclosed please find my VI (I tried two different methods to load the file and got the same results).

    Thank you

    Dan07

    Around this line, you will notice a bunch of tabs:

    240.4926373\t507.1851226\t\t\t\t...

    Edit: I would like to clean up the source, but if you're stuck here is a way to clean:

  • Can all help with VI to get data (HEX) serial number and write in the text file

    Hello I am struggling with this problem for 2 months... They get help from different I thought I solved the problem, but of no use yet I stand on zero

    Problem: I need to get data on USB high speed HEXAGON shaped (coming in hexadecimal and be stored in the text file to the hexadecimal format as each hexadecimal value online different I'll also to attach the file)

    Get us ASCII on series or VISA read but when trying to convert to hex as shown in text file making it slower to deal with code, I know that my VI will have to improve more... I'm waiting for suggestions

    Need urgent help...

    Thanks in advance

    Hi Ali Afzal,.

    I think that the attached example can work for you. If not, then try the solution with sending the data to a parallel running the loop and store it there.

    Mike

  • Not able to reverse the text file in ODI

    Hi guru,.

    I tried to load the data from Oracle database to text file. But I am facing problem during file reverse text.

    The columns in the text file are not reversed in the ODI data store. I get no error.

    Are there specific measures that I'm missing here? Any ideas / docs / links would be appreciated.


    As a solution, I added column manully right now and I can go futher. But I would be happy if reverse ODI will do it for me.

    Kind regards

    Manmohan Sharma

    Hi Matt,

    A thought,

    Make sure your data store is NOT LOCKED (UNLOCK) in reverse.

    Thank you
    Guru

  • Want to access the text file of ODI linux machine installed on windows

    Hi all

    I want to access the text file of ODI linux machine installed on windows computers.
    To do this, I created the server data files (physical schema) and;

    Host(Data Sever): IP address of the linux machine
    User: user of linux machine name
    Password: data

    Directory: / hyperian/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1 / * application *.
    I shared the folder app in linux machine.
    When you try to run the interface using this file inside the folder app, its giving below error


    7000: null: java.sql.SQLException: file not found: /hyperian/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/app/STORAGE.csv
    java.sql.SQLException: file not found: / hyperian/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1 /app/STORAGE.csv

    to com.sunopsis.jdbc.driver.file.x. < init > (x.java)

    at com.sunopsis.jdbc.driver.file.d.b.d.a (d.java)

    at com.sunopsis.jdbc.driver.file.g.a (g.java)

    at com.sunopsis.jdbc.driver.file.w.executeQuery (w.java)

    at com.sunopsis.sql.SnpsQuery.executeQuery (SnpsQuery.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt (SnpSessTaskSqlC.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep (SnpSessStep.java)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession (SnpSession.java)

    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand (DwgCommandSession.java)

    at com.sunopsis.dwg.cmd.DwgCommandBase.execute (DwgCommandBase.java)

    at com.sunopsis.dwg.cmd.e.k (e.java)

    at com.sunopsis.dwg.cmd.g.A (g.java)

    at com.sunopsis.dwg.cmd.e.run (e.java)

    at java.lang.Thread.run (unknown Source)


    One faces this question erlier? then helpme out.

    Hello

    1. If your files are located on a remote file system, you will need to copy one of your files to the computer that Designer ODI runs to allow ODI retrieve the metadata of the file information.
    2. in the topology to create a physical schema, the directory you enter data and the scheme of work must point to this local file.
    3. then set the file data store in the designer of the ODI. Enter a name, browse and select the file and fill each deposited the files tab.

    * If it's a fixed file, click on the network icon in the column into the columns tab and have checked auto adjustment.
    * If it is a delimited file, use the reverse button on the columns tab to reverse the columns.
    * Right-click on the Datastore folder select View Data, if you can view the data, which means that store file data has been correctly set.
    * If this is not the case, check each tab of the database file to make sure that everything is set correctly and try again.

    4. once the display data to be successful, now change you directories (data and the scheme of work in topology) to point to the remote file system. These directories must be accessible to the ODI Agent that will be used to perform transformations. The directory can be an absolute path (m:/public/data/files) or a parent in the ODI Agent startup directory (.. files/demo /). It is strongly recommended to use a UNC (regardless of the location of execution) name for the path. Executing transformations "agentless", the directory is relative to the directory where Oracle Data Integrator was installed.

    You must have an agent process running on the system that contains your source file.
    Then during the race, the odi interface choose this agent.

    Thank you
    Fati

  • Playback/record to the text files using HTML5 as a basis for the code

    Hi, I'm new and I did some research and I found a variety of solutions that seemed a little more complicated than I want. I would like someone to direct me to something that could teach me how to do two things.

    (1) read the text files (essentially my difficulty is how to interact with the file system of playbook for reading files and how to save text files with output 2).

    It is not necessary to try and catch.

    Thanks in advance!

    Hello ignites,

    The following thread contains an example of manipulation of text files and also contains a link to another thread by Tim Windsor where he describes working with other file types:

    http://supportforums.BlackBerry.com/T5/Web-and-WebWorks-development/ReadFile-and-data-manipulation/m...

    Let me know if you have any questions.

    Erik Oros

    BlackBerry Development Advisor

  • Dynamic text from the text file problem

    Go step by step to get my data from MYSQL/php... for now, I'm stuck and cannt even get it from a text file I do worng!

    This is the code I use:

    var myLoader:URLLoader = new URLLoader()

    myLoader.dataFormat = pouvez

    myLoader.load (new URLRequest ("trees.txt"))

    myLoader.addEventListener (Event.COMPLETE, onDataLoad)

    function onDataLoad(evt:Event) {}

    for (var i: uint = 0; i < evt.target.data.cant; i ++) {}

    This ["tcname_" + i] .text = evt.target.data ["tcname_" + i]

    }

    }

    My trees.txt file contains the following:

    Plum = tcname_0 & tcname_1 = olive

    I made this as well:

    & tcname_0 = Asian plum & tcname_1 = Amazon lily &

    I have already created a few instances of dynamic text from tcname_0 up to tcname_5

    I tried with having the text in dynamic text or leave it empt anyway... nothing is read from the text file, what I am doing wrong?

    In your trees.text file, you neglected to include the variable of cant, so the loop has an undefined value to life...

    Plum = tcname_0 & tcname_1 = olive & cant = 2

  • Load the text file into the Textarea

    Hi How can I load text files into Textarea I use this method seems like it load text file but I can't show it in a textarea a certain pls help

    Hi all
    Finally I found the way to load the text file into the textArea, that's like


    private function loadText (): void {}
    var l:URLLoader = new URLLoader (new URLRequest('2.txt'))
    l.addEventListener (Event.COMPLETE, finishLoading);

    }
    public void finishLoading(evt:Event):void {}
    var myData:String = new String (evt.target.data)
    txtBox.text = myData;
    }

    ]]>

    It should works because it is a work with me
    Take advantage of the code
    Sanji

  • output in the text file

    Hello

    I have two master & detailed for example, EMP, Dept table.

    I need my output in the text file with delimiter ~ in the format below.

    10~accounting~newyork
    7782~CLARK~MANAGER~7839~6/9/1981~2450.00~10
    7839~KING~PRESIDENT~11/17/1981~5000.00~10
    7934~MILLER~CLERK~7782~1/23/1982~1300.00~10
    Rgds

    VK

    Hello

    This should work to get the right file name, but you can add your own code.

    clear buffer
    clear screen
    clear columns
    
    column fname new_value my_spoolfilename
    
    input
    prompt Enter a valid department id..
    accept dept number prompt 'Department ID. :'
    
    select 'IND'||upper(d.department_name)||to_char(sysdate,'yyyymmddhh24miss')||'.txt' fname
    from   departments d
    where  d.department_id = &dept;
    
    spool c:\temp\&my_spoolfilename
    spool off
    

    If I run it as a script, I get:

    Voer waarde voor dept in: 30
    oud   3: where  d.department_id = &dept
    nieuw   3: where  d.department_id = 30
    
    FNAME
    ---------------------------------------------------
    INDPURCHASING20090517125510.txt
    Verstreken: 00:00:00.39
    HR%xe> 
    

    And my c:\temp\ dir contains a file named INDPURCHASING20090517125510.txt:

  • alignment of the text in landscape mode domestic xperia

    I installed xperia home 8.1.A.0.8 (later for me, not preinstalled with lollipop 5.1.1 so far no update of 8.0.A.1.2) pitcher my Z3, but mode landscape, there is problem with the alignment of text (or envelope). text (app name) is covered by another icon of app´s.

    The cause for the missing items, sometimes at a Xperia has been found and it will be corrected in a future update to the phone. Thank you for providing us with the newspapers and the video!

    Is the alignment of the text always like this or is it when the search and menu items are missing?

  • Download the text file of the site domain

    I need to download a text file to a directory of a domain site.  Text file is saved  What to do next?

    On your PC, right-click on the text file, and then click on copy.

    Connect to the domain (if you don't know how, you will need to get instructions from the domain administrator on how to configure your PC to connect to the domain - specific settings that are required there and they differ by area - and you may need to be configured on the domain and given rights).  Once the installation program I would map a drive to the field to make easier access next time.  Navigate the site of field to the directory where you want the file to exist.  Right-click on the directory and click on paste.

    The file will now have been copied in the domain site directory (assuming you have the appropriate permissions on the domain server to add files in this directory - you will need to talk to the domain so that administrator it it gives you an "access denied" or "you do not have sufficient to perform this task" or a similar error message).

    That's all there is to it.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • When the file is saved in windows 7, save the description with the name of the file by the text file

    I need to save files much but don't have time to write the file name and detailed inform instead. When I want to save the file, windows 7 displays the window requires the file name and type. But I need another box that I can describe the detailed information associated file name. This will generate the text file that detailed information with the name of the file.

    Is there a s/w or windows 7 can do that?

    It is not possible to save a file without a name. You must specify a name for the file. In addition, you can add additional information in the comments of the file area. You can open the section "Comments" by going to the properties of the file and go to the Details tab.

  • testimonial widget that reads the text file

    Is there someone who makes a testimonial widget that can read a text file? I am considering this is a block for customer testimonials that can read a file of say 50 different clients we wil cut and paste from various places, so that there is always a fresh review illustrated.

    Themes of Muse has some text widgets: one as a ticker-tape driveand displays a (small) number of citations. But none will allow you to modify a file of text outside the Muse of let's say 50 paragraphs and read on the page, one by one, in order.

    There are a lot of scripts to do exactly what you want, like this: alternating Message text box . JavaScriptSource, and many others, just Google: "alternating rotation script of text message". But are you able to manage scripts and HTML codes in Muse ? Maybe some useful script Wizard can cook a place for you or modify an existing one, provide you a text template file and help hair and be implemented in Muse page.

    Don't let them not to edit your output !

    Ask them to help you with a method to ensure within the Muse:

    1. adds a style and script in the header of page (see Page Properties)

    2 Insert the HTML code on the page (under the object menu)

    3 attach the text file on the site (hyperlink, link to the file)

    So, you can change the text file and download all changes with Muse.

    Hope this helps?

Maybe you are looking for

  • Should I buy a new iMac?

    I currently have an iMac that I bought in February ' 08. It has 2 GHz Intel Core 2 Duo and 4 GB 667 MHz DDR2 SDRAM. I'm on OS 10.6.8.  I upgraded the memory a few years ago.  Things seem to become a little slow on this subject. We may need the latest

  • Rundll 32 has stopped working

    Stopped DVD/CD burner that is recognized by the operating system.  Tried many solutions recommended without any positive result, although twice after a night at the stop "DVD/CD burner" showed in "Device Manager".  When you try to run a computer star

  • Adding ram to XC-705-UR53

    Hello. I recently bought a XC-705-UR53 with a single 4 GB of ram. As I have an open slot, that I would like to upgrade. After reading a few posts on here and other information on the web, I think that I found about what I can and cannot be used to up

  • "dsca.exe program has stopped working".

    At startup I get an error message indicating "dsca.exe program has stopped working" how to fix this?

  • How to compare the content of two Wordpad / documents notebook without reading them line by line?

    How to compare the content of two Wordpad / documents notebook without reading them line by line?