How to get sqlplus not to use the output of size documents fixed?

I want to generate the sql code to clear all data in tables in the database of flat files, one file per table, one row per record.  I thought I'd try to use the ascii code for characters inherited 31 as a delimiter to separate the fields and start sqlplus. But a problem is how do you get to specify linesize? Are there not a way to get out of creating fixed size records in sqlplus? I would prefer each line to just be so great that it must be rather than set the linesize being the absolute maximum. (32767) or understand what the maximum size is on a per-table basis.

Is it possible to do?

What I've tried so far (so I would have executed him each resulting sort script d30_x.) OK but how to get rid of this thing linesize?

/ * create dump file using US 31 to separate the fields * /.

wrap off Set

Set linesize

Set feedback off

set pagesize 0

set verify off

UNDEF tab;

set myfile = d30_ & & tab... SQL;

is prompt myfile and myfile;

coil & myfile

Guest set linesize 2500

Guest set pagesize 0

Guest departed wrap

quick game check out

Quick spool & tab... LST

Select guest of

Select lower (column_name) |' | Chr (31)

||'
of user_tab_columns
where table_name = upper ('& tab') and
column_id! = (select max (column_id) in the user_tab_columns where)
table_name = upper ('& tab'))
order of column_id
/
Select lower (column_name)
of user_tab_columns
where table_name = upper ('& tab') and
column_id = (select max (column_id) in the user_tab_columns where)
table_name = upper ('& tab'))
order of column_id
/
from guest & tab
Guest /.

prompt off spool
spool off

Wait, I think it works!  Tell him to use the maximum linesize, then

tell him to get rid of these spaces.

OOPS I forgot something. A problem with this is that if there are embedded newlines \r \n one of those or both in a field, then this format that uses the newline to indicate the end of the recording is toast. And I know that they are inclined to do this. (Users can not live with them, can't live without 'em). More on that later.

/ * create dump file using US 31 to separate the fields * /.
wrap off Set
Set feedback off

set linesize 150
set pagesize 0
set verify off

UNDEF tab;

set myfile = d30_ & tab... SQL;
prompt myfile is &myfile;

coil & myfile
Guest set pagesize 0
Guest departed wrap
quick game check out
prompt value trimspool on
Guest trimout value on
Guest set linesize 32767
fast coil & tab... LST

Select guest of
Select lower (column_name) |' | Chr (31) | »
of user_tab_columns
where table_name = upper ('& tab') and
column_id! = (select max (column_id) in the user_tab_columns where)
table_name = upper ('& tab'))
order of column_id
/
Select lower (column_name)
of user_tab_columns
where table_name = upper ('& tab') and
column_id = (select max (column_id) in the user_tab_columns where)
table_name = upper ('& tab'))
order of column_id
/
Guest of & tab
Guest /.

prompt off spool
spool off

Post edited by: Lake

Tags: Database

Similar Questions

  • How to get distinct records by using the ListAgg OBIEE report function?

    Hi all

    I get a correct result as mentioned below. But I don't see duplicates in my result here, in my example, I get duplicate for the name of the employee 'Pat '. So how to get Distinct values by using the LISTAGG function?

    Data set of sample with the Department and its employees

    Service employee

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

    Marketing Michael

    Pat of marketing

    Pat of marketing

    Pat of marketing

    Purchase of Den

    Purchase of Alexander

    Purchase of Shelli

    Purchase of Sigal

    Guy of purchase

    Purchase of Karen

    Using the ListAgg function, we can convert it to:

    Employees of the Department

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

    Marketing of Pat, Pat, Pat, Michael

    Purchase of Sigal, Shelli, Karen, Guy, Den, Alexander

    I tried a lot of things, but I'm not able to understand how exactly this can be achieved, if anyone has any idea or suggestions please do share, thanks in advance.

    After much research, I found the solution & I want to share what he finds very useful, we can create SQL logic in the Advanced tab, as below and after you click Rescan, and then you will get your desired results.

    SELECT saw_0, Evaluate_Aggr T1.dept ("ListAgg(%1,'' & '') intra group (about 1%)") ("as long as VarChar (1000), T1.emp) saw_1 FROM)

    SELECT 'emp_dept '. "the Department dept,

    'emp_dept '. "' employee ' emp

    IN THE "DOMAIN".

    GROUP BY dept, emp

    ) T1 GROUP FROM T1.dept ORDER BY saw_0

    Also note here that we have good anti-aliasing for columns parent (ex: saw_0, saw_1), another by mistake oracle bi server.

  • How to get GMT or IST using the PL/SQL FUNCTION

    Hello, I use Oracle 10 G database (operating system: Windows-32 or 64 Windows).
    How can I get the date and time GMT or International without mentioning SYSDATE / DBDATE.
    Real problem the DB Sever time is frequently manipulated by the end user and I would like to connect the actual date and time of the transaction in other audit tables.

    Kind regards

    Tarun

    It won't increase your load on the server, you would simply have many waiting http events and the performance of your application depends on your internet connection to customers. Something not very desirable if you ask me and certainly will cause you headaches. Really bad headaches, and one day someone will ask who came up with the brilliant idea to get the timestamp system via http instead of... + sysdate + (I smell a future article http://thedailywtf.com/).

    In any case; That is: the http based sysdate function. I use mod_plsql to my 'webservice' running on a server where I'm sure the date is correct. You can use what you want, for a 'real' webservice implementation will be a little different. Google should know the answer about calling Web services from the data base.

    $[CHE_TEST@asterix1_impl] create or replace procedure server_time as
      2  begin
      3  htp.print(to_char(sysdate, 'dd.mm.yyyy hh24:mi:ss'));
      4  end;
      5  /
    
    Procedure created.
    

    As you can see the procedure does nothing else then exit the sysdate from my database server in a specified date format. I then call the procedure mod_plsql via utl_http on another server:

    $[CHE_TEST@asterix2_al32utf8] create or replace function get_server_time return date is
      2  begin
      3    --default would be 60, this is clearly too much
      4    utl_http.set_transfer_timeout(1);
      5    return to_date(utl_http.request('http://ias4/asterix1_impl_cronet/server_time'), 'dd.mm.yyyy hh24:mi:ss');
      6  exception
      7    when utl_http.REQUEST_FAILED then
      8      return sysdate;
      9  end;
     10
     11  /
    
    Function created.
    

    Now get_server_time will give me the time of my first database server (unless the requested HTTP fails for any reason, then it'll be sysdate)

    $[CHE_TEST@asterix2_al32utf8] select get_server_time from dual;
    
    GET_SERVER_TIME
    -------------------
    24.07.2012 13:35:00
    

    Again, if you go in this way use the feature carefully and not at each end of your application as it will give you performance problems .

    see you soon

  • Re: How to get Corel WinDVD without using the recovery disk?

    The update for Corel WinDVD was rather messy and because of this some owners laptop uninstalled to try to install the new software. Now, we ended up with the only possibility of an image recovery, which, in practice, means losing the software.

    Updates for the Bluetooth and wifi are also pretty messy.
    Is isn´t possible to get this software back without using the recovery disk?

    As you probably know recovery image installed on Toshiba laptops is a kind of software that includes the operating system, drivers, tools specific to Toshiba and utilities but also some additional software like antivirus or DVD player application.

    All drivers and Toshiba tools and utilities are available on the Toshiba download page, and if you want to install the version of the OS, you can download each of them.
    This additional software is not available for download. It's a kind of gift on the owner of the laptop because as the new owner, your machine must be ready to employment with full protection and opportunities to use multimedia content.

    If you don't like it, you can remove the system and use your own applications.

    Summary: this software cannot be downloaded separately and if you want to have it again, you must install original image of recovery designed for your machine.

    If you have any other questions do not hesitate to ask.

  • Created a form of the ADF since a human task - how to get other human tasks use the same form ADF?

    We are new on the forms of the ADF and we have a simple workflow with a few different human tasks.

    The task of the initiator, I right click it and automatically generated a form of the ADF.

    The rest of the human tasks have the same payload, and I want just the other human tasks use the same ADF form I've already created. How can I do this?

    Thank you.

    Yes, there is a way to reuse the shape of the ADF and its workflow for several human tasks as long as the payload is the same.  To do this:

    1. Open the file "hwtaskflow.xml" inside your project of the ADF.  It will be difficult to read when you first open it so right mouse click the xml file-> select "reformat".
    2. Copy the 6 lines with the element with the form that you want to reuse-> pick up the 6 lines in the file under the rows that you copied.  The and elements in the text that was copied just need to be changed from the old human task name (for example, ".../MyHumanTaskOriginal") on behalf of the human recycled news of the task (for example, ".../MyHumanTaskReused").  Don't forget to leave the text in the and items of value to their original name.
    3. Redeploy the project.

    Dan

  • Get - VM: with "xyz" name VM is not found using the specified filters.

    Hello everyone!

    I have a script that reads a CSV with multiple host names, to connect to vCenter and should get the name of host, ip and PortGroup information to generate an external file of CSV.
    It happens that several cases vm does not exist in vCenter and returns me the below error:

    Get - vm: 04/07/2016-14:41:58Get - VMVM with the name "pxl1sso00008" was not found using the specified filters.

    No caractere:31 of C:\Users\f3135606\Desktop\vmTeste1.ps1:25

    + foreach ($vmName in $vmList) {get - vm $vmName |} Select Name, @{N = "Network"; e = {$_...}}

    +~~~~~~~~~~~~~~
    + CategoryInfo: ObjectNotFound: (:)) [Get - VM], VimException)
    + FullyQualifiedErrorId: Core_OutputHelper_WriteNotFoundError, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM



    How would I do to get the information from an input file, see the vCenter and if this positive results write the file, ignoring errors. Ideally, if not to find the machine, simply create a line in the output file with only the hostname with the rest in white.

    Follow the .ps1 file:



    $vmlist = Get-Content C:\vmnames.csv
    
    if (!(Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue))
    {
    Add-PSSnapin VMware*
    Set-PowerCLIConfiguration -DisplayDeprecationWarnings $false -DefaultVIServerMode multiple -InvalidCertificateAction Ignore -Scope Session -ProxyPolicy NoProxy -Confirm:$false | Out-Null  
    [void](Get-PSSnapin VMWare.VimAutomation.Core -ErrorVariable getVmwareSnapinErr 2> $null)
    if ($getVmwareSnapinErr.Count -gt 0) {    Add-PSSnapin VMware.VimAutomation.Core }
    }
        
    $VCconn = Connect-VIServer $vCenter -User $vUsuario -Password $vPass > $null
         
    foreach ($vmName in $vmList) {get-vm $vmName| Select Name, @{N="Network"; e={ $_ | get-networkadapter|Select-Object @{N="Network";E={$_.NetworkName}}} }, @{N="IP Address";E={@($_.guest.IPAddress[0])}}|Export-Csv –path c:\scripts\vlans.csv –NoTypeInformation}
    

    Laurent,

    See below... should get what you want... If the virtual machine is not found that it only allows to correct the virtual computer name in the output.

    $vmlist = Get-Content C:\vmnames.csv  
    
    if (!(Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue))  {
        Add-PSSnapin VMware*
        Set-PowerCLIConfiguration -DisplayDeprecationWarnings $false -DefaultVIServerMode multiple -InvalidCertificateAction Ignore -Scope Session -ProxyPolicy NoProxy -Confirm:$false | Out-Null
        [void](Get-PSSnapin VMWare.VimAutomation.Core -ErrorVariable getVmwareSnapinErr 2> $null)
        if ($getVmwareSnapinErr.Count -gt 0) {
            Add-PSSnapin VMware.VimAutomation.Core
        }
    }
    
    $VCconn = Connect-VIServer $vCenter -User $vUsuario -Password $vPass > $null
    $arrVMInfo = @()
    
    foreach ($vmName in $vmList) {
        $vm = get-vm $vmName -ErrorAction SilentlyContinue -ErrorVariable VMError | Select Name, @{N="Network";E={ $_ | get-networkadapter | Select-Object @{N="Network";E={$_.NetworkName}}} }, @{N="IPAddress";E={@($_.guest.IPAddress[0])}}
        if ($vm -eq $null) {
            $arrVMInfo += New-Object PSObject -Property @{ `
                Name=$vmName `
            }
        }
        else {
            $arrVMInfo += New-Object PSObject -Property @{ `
                "Name"=$vm.name; `
                "Network"=$vm.Network.Network; `
                "IP Address"=$vm.IPAddress `
            }
        }
    }
    $arrVMInfo | Select Name, Network, "IP Address" | Export-Csv "c:\scripts\vlans.csv" -NoTypeInformation
    
  • Got a legal question about the installation of Adobe Photoshop Elements.  How to get help from Adobe using a chat session?

    Got a legal question about the installation of Adobe Photoshop Elements.  How to get help from Adobe using a chat session?

    AdobeTomFaith

    If your program is Photoshop Elements, then you have posted in the wrong forum. Some how your son got posted in the Forum Adobe Premiere elements (video editing). Please re-post your thread in the Adobe Photoshop elements Forum.

    Photoshop Elements

    Wherever your son is, please include Adobe Photoshop Elements version and operating system and the description of the installation problem (error messages, stage of failure, etc.)

    Support Adobe seems to be limited to Adobe cat and is classically limited to the current version which is 13. Then, you the best avenue to success is likely to be through the Adobe Photoshop elements Forum. But that shouldn't stop you trying to determine what kind of support you can get from Adobe cat on your question.

    I would offer this link that is specific for Adobe Chat download and installation

    Contact the customer service (this is not the same destination as shown in a previous post in your thread)

    This link is specifically designed for

    Photoshop Elements

    Download, installation, setting up

    Download and installation

    Panel discussion

    (18:00 - Friday 7 pm Sunday)

    Thank you.

    RTA

  • How not to use the squint no functionality?

    I forgot how not to use the squint no functionality. Can anyone help?

    18.0 Firefox was released last Tuesday, you need to update.

    See if this FAQ for NoSquint answers your questions.

    https://urandom.ca/NoSquint/#FAQ

  • Can someone direct me to resources on how you get TWO esx servers to the same storage array?

    Hi all

    I use:

    2 x Compaq DL380 G2 with 5i

    cards controller 5300 AND attached to the base storage Bay

    STORAGEWORKS ENCLOSURE 4354R RM DOUBLE PORTS U3 (not yet pregnant

    compatibility list).

    The first server appears to see the good in the console of the virtual server storage Center.  The second server will see s for only its own storage room tho.  How do both to see and use the same storage.  The concept is new to me, but trying to learn.  Is there something I need to see the same storage in the virtual Center for TWO machines esx Server?  All IM just not in the right place?  Thank you.

    http://communities.VMware.com/thread/78873 was a previous thread on this can enlighten us. Looks like the 4354R has the bus is divided into 2 x 7 disks and each connector in the back can 'see' 1 of the two buses. The quickspecs (http://h18000.www1.hp.com/products/quickspecs/10624_div/10624_div.html) refer to "... allows access to two areas of storage separated from two different servers. So the first "thing" would be to get two buses attached together inside the unit so that the two connectors on the back see all readers, you must get the endpoint SCSI disabled on the device (you want termination on each 'end' of the cable that is two SCSI adapters in the servers).

    While you might be able to get the 4354R shared between the two ESX hosts, you can also get all the benefits of the shared disk + the possibility of vMotion, etc. by implementing the 4354R known as iSCSI or NFS storage. It also swings you back to something that is 'supported '. To do this, you have two approaches

    1. Fix 4354R on one of the ESX boxes, create a virtual machine that has access to the entire disk on the 4354R and run something like OpenFiler in the virtual machine to 'share' the disk via NFS or iSCSI

    2. Set up a 3rd server if you have one available and run the version of "bare metal" OpenFiler, or install Linux or OpenSolaris distribution and configure NFS and/or iSCSI target.

  • How migrations (El Capitan) not come to the photo library?

    Hello

    I want to use the Migration Wizard to move my user account for my MacMini BUT put the photo library on a separate hard disk from the system drive.

    My MacMini has two internal drives, the library is huge.

    The MacBook (early 2008 - running Snow Leopard) old a MacMini (late 2009 - El Capitan cool running).

    How migrations (El Capitan) not come to the photo library? It seems to only be set for the entire account.

    If I do this, put the library on a separate disk. How to use Time Machine to back up the library?

    The separate HARD disk transfer photo library, and then delete the disk that you are migrating.

    Time Machine backup disks all connected, unless you put them in the list of exclusions.

  • How can I turn OFF any possibility of use of private browsing OR - how to set a password to use the private browsing?

    How can I turn OFF any possibility of use of private browsing OR - how to set a password to use the private browsing?
    My children are free to use the internet - but I don't want them to be able to hide their internet activity to me.
    Thank you.

    Try this new extension - turn off private browsing:

    https://addons.Mozilla.org/en-us/Firefox/addon/disable-private-browsing/

    Ignore the review I did there on the 22nd, as both versions again, improving have been released during the 6 days and most of the articles I've written about have been fixed.

    Richie just needs to get to the function disable compensation no browsing history, who works at.

  • I get a message: to use the 'java' command line tool, you must install a JDK.  I tried 10 times to install without success.  Help, please.

    I get a message: to use the 'java' command line tool, you must install a JDK.  I tried 10 times to install without success.  Help, please.

    You probably have some of the older than the needs/desires software legacy Java installed.

    Please see these sons of community message:

    After the installation of El Capitan, I get the message: to use the 'java' command line tool, you must install a JDK

    Just found this last Java does not work with El Capitan

    This is the Apple link to the legacy version of Java 6.

    Download Java for OS X 2015-001

    First of all, I would like to try to identify what application generated the next message and update (delete) this request as the case may be. If you need to run Java then, as the Apple Support page says it's certainly preferable that your installation of Java entirely up-to-date with the Oracle's Java course. If you can get without Java, you should install it not - like the Flash, it should not be installed unless you have no choice.

  • URG: How can I force APEX to use the specific schema: spaces of work APEX_040100 or entitled to another schema?

    Hi all

    Here's the scenario:

    1. My computer crashed. were to return to complete export (expdp 11.2.x to impdp 12 c). successfully done.
    2. Configured ADR blah blah... can access the admin of the apex.
    3. Problem is: administration interface does not SEE my workspaces apex Apex (only the workspace IN-HOUSE).
    4. After investigation it seems that APEX (after the upgrade) is somehow configured / run with: schema APEX_040200 and not

    APEX_040100 (as I have improved Apex in the old database versions).


    5. If I'm running the following:

    ALTER session set current_schema = APEX_040100;

    Select short_name, display_name

    of wwv_flow_companies

    where source_identifier is not null;


    I SEE all my beloved workspaces.

    6 my questions:

    a. How can I force APEX to use the specific schema: APEX_040100 instead of APEX_040200?

    b. or are there other alternatives to assign these workspaces in the current environment?


    Concerning

    Etay G

    Hello Brad,

    Thank you for your response. Appreciated.

    • Yet, as I had a little corrupted environment Apex after import (impdp), COMPREHENSIVE database this method of revocation (above) has failed several times to me.
    • Here's what I have (solves the problem):
    • Deleted APEX_040200 Apex 4.2 installation().
    • Text left in DB is the only APEX_040100
    • Then, the version 5.0.3 and it worked!

    More importantly, after the installation of APEX, all workspaces, users, etc. are automatically correctly resided in APEX.
    • I think that if you have only 1 version of apex corrupted in DB. It should work as well. Remove again, schema using the above script (check version) with caution (after backup, etc.).

    Kind regards

    Etay G

  • The listener is down: even if a listener with the name "AUDITOR", is running on this host at the port: "1521", it has not started using "the target LISTENER. ORA file.


    I moved a listener on a host in a House different oracle. The headset works fine, but EM 12 c shows that the listener is down with the following summary:

    The listener is down: even if a listener with the name "AUDITOR", is running on this host at the port: "1521", it has not started using "the target LISTENER. ORA file. CORRECTIVE ACTION: To monitor this "EM listener target" with its current configuration, you must stop the process of listening running and start it using the Listener parameter file: opt/oracle/product/12.1.0.2/network/admin/listener.ora. Alternatively, you can update "this target LISTENER. Location ORA setting"with the location of the listener running, which started using the: opt/oracle/product/11.2.0.3/network/admin/listener.ora.

    EM 11 g, I simply changed the configuration of the listener for the different oracle home, argued the change and in a few minutes the listener would show that 'UP' with the oracle of new home. I upgraded to MS 12 c (12.1.0.4) and can't find how to do this. Can someone give me the procedure.

    Thank you

    Ron

    Hi Ron,

    Can you please do the following?

    -Create a for the listener listener.ora file, stop and start the receiver using the listener.ora file. If the file is located in a default location, set the TNS_ADMIN environment variable to that location before you start the listener.

    -Log on to the EM console, go to the homepage of the listener.

    -In the Oracle Listener menu, select target Configuration > Configuration of the analysis.

    -Ensure that the parameters, including the Listener.ora directory, are properly.

    Kind regards

    -Loc

  • Please how to create an e-commerce using the muse of adobe

    Please how to create an e-commerce using the muse of adobe

    ECWID is certainly the easiest to customize muse and it's very easy for customers to add/manage products. Another thing that many people love in Ecwid, it's that you can host several stores account. If you know css/javascript then you can do this on your own, but if you want a widget that does, make these widgets.

    If you are looking for some great Ecwid widgets, you can enter these ones that are free. And if you are wanting to customize even more (including the ability to host multiple account stores), you can get these even more impressive widgets for $14.99 with promo code: 1MUSESTORE #.

Maybe you are looking for