I want to write record type variable in ult file.How to i can write record type varable without column name.

I want to write record type variable in ult file.How to i can write record type varable without column name.
type rec_format_type is record
     format1  VARCHAR(3),
     format2  VARCHAR(3),
my_record     rec_format_type;
UTL_FILE.PUT_LINE(file_out, my_record);

ibney wrote:
I have below requirement.
DECLARE
     emp_data UTL_FILE.FILE_TYPE;
BEGIN
    emp_data := UTL_FILE.FOPEN ('EXDATAPUMP','TEST_BC_NN_PARALLEL.csv','W',32000);
    FOR TEST1 IN (SELECT /*+ PARALLEL(TEST_BC_NN,4) */  * FROM TEST_BC_NN) LOOP
        UTL_FILE.PUT_LINE (emp_data, TEST1);---Here i want to write record in utl file.without knowing the structure of table
    END LOOP;
    UTL_FILE.FCLOSE (emp_data);
END;
Why all the ugly upper case? You do realise that NO programming standard, ranging from Java and .Net, to C/C++ and Ada (of which PL/SQL is an implementation of), use upper-case-for-reserved-words as a standard.
The easiest and simplest way to address your requirement is as follows:
SQL> create or replace type TStringArray is table of varchar2(4000);
  2  /
Type created.
SQL>
SQL>
SQL> begin
  2          for c in(
  3                  select
  4                          TStringArray(
  5                                  to_char(empno,'000000'),
  6                                  ename,
  7                                  to_char(hiredate,'yyyy-mm-dd')
  8                          ) as COLS
  9                  from    emp
10                  order by empno
11          ) loop
12                  for i in 1..c.Cols.Count loop
13                          dbms_output.put( c.Cols(i) );   -- write column
14                          if i < c.Cols.Count then
15                                  dbms_output.put( '|' ); -- write column separator
16                          end if;
17                  end loop;
18                  dbms_output.put_line( ' *end*' );               -- write record terminator
19          end loop;
20  end;
21  /
007369|SMITH|1980-12-17 *end*
007499|ALLEN|1981-02-20 *end*
007521|WARD|1981-02-22 *end*
007566|JONES|1981-04-02 *end*
007654|MARTIN|1981-09-28 *end*
007698|BLAKE|1981-05-01 *end*
007782|CLARK|1981-06-09 *end*
007788|SCOTT|1987-04-19 *end*
007839|KING|1981-11-17 *end*
007844|TURNER|1981-09-08 *end*
007876|ADAMS|1987-05-23 *end*
007900|JAMES|1981-12-03 *end*
007902|FORD|1981-12-03 *end*
007934|MILLER|1982-01-23 *end*
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • How many steps can be recorded in the History panel?

    In Photoshop, 20 steps can be recorded in the Histroy panel with the defult setting, and we can change the setting to record more or less steps by choosing "Edit> Preference".
    In Lightroom, how many steps can be recorded in the History panel with the defult setting? And how can we change the number of step to be recorded?

    I guess since the history is kept in the database (and not only in memory as with PS), there is not so much an issue in limiting them.
    Beat Gossweiler
    Switzerland

  • How many min. can i record with voice record with MuVo V200 1

    Hi,
    I'm going to buy the Creative MuVo V200 GB.
    Now my questions about this player.
    How many minutes can i record over voice recording.
    Maybe someone can tell me how much Megabytes minute of recording will take.
    Are there different quality levels of recording?
    In which format does the player save the recordings?
    I will use the player to record lectures at the uni'versity.
    Did anyone have done this?

  • How much video can be recorded on the new iPad?

    What is the new iPad's video recording capacity?
    Kal

    A better question is to ask what the average data recording rate is.  Based upon that you can calculate whatever limits you desire.
    I've recorded a few short clips, in the neighborhood of 10-30 seconds, and from that and the resulting file size I calculate that 1080p recording requires roughly 2.8 MB/sec, or 168 MB/min, or 10 GB/hr.
    You should be able to figure out whatever you need from that.  Of course, these numbers are based upon the videos I've taken with my new iPad.  YMMV.

  • In Files, How to read and write spaces,tabs and newlines

    Love..........
    After having read a file into a string, when
    I use this string in TextArea's setText()      
    method. Text Area do not care for spaces,tabs,
    newlines. if I print same string using println()
    out put has lines,spaces and tabs
    ----why-------
    Similarly when I write to a file getting text
    from Aextarea,out put file also produce same
    result .

    First, if you would like to create a text area that wraps the text, instead of just running on and on, you need to specify, when creating the text area, that you do not want a horizontal scroll bar. For instance:
    textArea = new TextArea("", 30, 60, TextArea.SCROLLBARS_VERTICAL_ONLY);
    Why does println() cause a newline? Because println means print line... as in, it will print the text, then give a carriage return and line feed value, causing a new line to be created.

  • How many shows can you record at one time?

    I have the CHS435HDC and I was talking to the rep and he thought it was 7 shows at one time....being a previous tech rep from the 'other guy', I know the standard is two shows at once and watching one of the other, nothing beyond those two.....
    Anyone know the answer?  Checked the website and didn't get anything, googled the manual and that was no help and cicso website doesn't show this model...
    Thanks in advance...
    K

    humarock1150 wrote:
    I have the CHS435HDC and I was talking to the rep and he thought it was 7 shows at one time....being a previous tech rep from the 'other guy', I know the standard is two shows at once and watching one of the other, nothing beyond those two.....
    Anyone know the answer?  Checked the website and didn't get anything, googled the manual and that was no help and cicso website doesn't show this model...
    Thanks in advance...
    K
    You can record two programs at once, and concurrently:
    1) Watch either of the programs being recorded.
    2) Watch a previously recorded program.
    You cannot watch a third channel or a VOD program.
    The above is on the DVR itself. If you have additional STBs, you can of course watch other channels or VOD on them.
    Justin
    FiOS TV, 25/25 Internet, and Digital Voice user
    QIP7232, QIP7100-P2, IMG 1.9.1
    Keller, TX 76248

  • IDoc to file - how to delete a blank record at the end of the file.

    Hi,
    My senario is IDoc to file.  I have successfully implemented this using FCC. But when i checked the flat file, it has a blank record at the end of the file( i think PI adds one blank line/record at the end of the file).  Please suggest me What i need to do, to delete the blank record .
    Thanks & regards
    Sreeni

    Kindly Check below.
    Check whether the problem is at mapping level of  adapter level.. to do this count no. of rows/IDOC before mapping and after mapping in IE and no. of rows in the output file.
    Thnx
    Subbu

  • SQLLDR: (CTL file) How to ONLY load 1 record of the CSV file

    Hello,
    We are in 11g, and we get CSV data.
    I'd like to know if there is a way in the CTL file to specify that I only want to load first row ?
    I know how to do it if there is a common unique value in the first row (WHEN myColumn = 'value1' )
    BUT, in that case, first row doesn't hold any specific value, and I think that I have to tell the loader to take only first row.
    I hope it is clear.
    Here is the CTL, in the case we can get a specific value for first row:
    LOAD DATA
    CHARACTERSET WE8ISO8859P1
    APPEND
    CONTINUEIF LAST != ";"
    INTO TABLE IMPORT_FIRST_LINES
    WHEN COL_3 = 'firstRowValue'
       FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    ( COL_1         CHAR
    , COL_2         CHAR
    , COL_3         CHAR)
    {code}
    So, I think I need to change the *WHEN clause*.
    I hope it is clear enough for you to understand.
    Thanks in advance,
        Olivier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    just change the control file like this,
    LOAD DATA
    CHARACTERSET WE8ISO8859P1
    APPEND
    CONTINUEIF LAST != ";"
    INTO TABLE IMPORT_FIRST_LINES
    WHEN COL_3 = 'firstRowValue'
    FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    ( COL_1 CHAR
    ----------- if you only want to load 1st column of csv file to first column in table.

  • High Def mini DV camcorders, how many minutes can you record?

    Im looking for new camcorder,
    Sony website says High Def 60 minutes of playback and recording
    But guys at Best buy say 20-30 minutes so im just trying to find out whos right.
    How much time does a tape last?

    Hi Applenoobie
    Whether using High Def tape or regular DV tape you will record for at least 60 minutes. Most DV tapes have grace by adding a few minutes of extra tape just in case. Where you'll find a difference is if you are taping in High Def or standard Def. High def seems to consume more power or standard def. Thus, you battery will not last a total 60 minutes unless you buy a biger battery than comes standard with most cameras. Perhaps that was what the guys at Best Buy were trying to convey.
    DV tape whether high def or standard def is superior to camera that employ a hard drive, record directly to DVD, or mini DVD, or even flash based video cameras because each of these encode the video and compress it in different ways. In most cases you can get at the video, but to make it editable you'll need some kind of 3rd party application to convert it to the DV standard anyway. then you will have the issue of how to store hours upon hours of video. DV tape is the way to go.
    See your previous post.
    http://discussions.apple.com/thread.jspa?threadID=814004&tstart=0
    And Sue it looks like those fast fingers of your beat me again!
    Carl

  • How many tracks can i record simultaneously w/ my 0404....

    ok,
    I'm happy w/ my Emu 0404 soundcard as of now, but i'd really like to be able to record more than two tracks simultaneously. I'm running my mackie 1604 VLZ Pro into the 1/4" inputs from bus 1 & bus 2. What i'm wondering is if there's a way to connect up to the digital or optical inputs via my mixer (or some adapter to do so) so i could utilize those in PatchMix for more simultaneous tracking. This would be great when there's more than two folks playing at my place. I really only need 4 since i personally would bus a drum set - don't really like messing w/ 8 tracks of drums...yet
    The I/O config. going into the 0404 is:
    Two 1/4" Analog Inputs and Outputs - already used sub 1 & 2 going in, coming out goes to channel 15 & 16
    Optical 24-bit/96kHz S/PDIF In/Out (switchable to AES/EBU) - may get used for the PS2
    Coaxial 24-bit/96kHz S/PDIF In/Out (switchable to AES/EBU) - what i would think could be tracked w/ a converter
    MIDI In/Out - not gonna happen from what i've learned
    First off, is it possible?
    secondly, if so, what do i need to make it possible?
    I was thinking something like the Art DIO to just take my other two buses in and put them out of the DIO as digital outs?
    Thanks for any help you can give me.
    Thanks,
    John J.
    Message Edited by praga77 on 03-08-200604:50 PMMessage Edited by praga77 on 03-08-200604:50 PM

    praga77 wrote:
    ok,
    I'm happy w/ my 0404 as of now, but i'd really like to be able to record more than two tracks simultaneously. I'm running my mackie 1604 VLZ Pro into the 1/4" inputs from bus 1 & bus 2. What i'm wondering is if there's a way to connect up to the digital or optical inputs via my mixer (or some adapter to do so) so i could utilize those in PatchMix for more simultaneous tracking. This would be great when there's more than two folks playing at my place. I really only need 4 since i personally would bus a drum set - don't really like messing w/ 8 tracks of drums...yet
    First off, is it possible?
    secondly, if so, what do i need to make it possible?
    Thanks,
    John J.
    4 x I/O (like the model number says 0404) which of 2 is analog I/O's and 2 digital I/O's.
    This means --> 2 analog ins with that Mackie.
    To input via SPDIF into 0404 --> you need a A/D Converter [Mixer -> A/D -> 0404]. The A/D can cost about the same another 0404 would cost.
    My suggestion is to get a device with enough of I/O's so you get drums recorded properly as well (like you mentioned).
    There are couple of low priced systems available with good amount of I/O's --> like
    Hercules 16/12 FW (16-in/12-out) (under 300$):
    Reviews:
    http://www.soundonsound.com/sos/feb05/articles/hercules1612fw.htm
    http://www.tomshardware.com/2005/02/10/hercules_16/index.html
    jutapa
    Message Edited by jutapa on 03-09-200601:26 AM

  • How to change default file permissions so others can write to file

    We have 15 people sharing files on a network. If we open a file on the network, work on it, and save it, it is readable and writeable for everybody. But if we drag the file off the network, work on it on our own hard drive, and save it, and THEN drag it back to the network, it is read-only for everybody. Documents made on our own hard drives are, by default, read-only for others.
    This is a real time waster for us!
    This means that every time we make a document on our own hard drives, we have to remember to go to the extra trouble to change it's permissions before we put it on our network. Please, is there some way to change the default settings, so that if I, say, save a Word doc on my hard drive and then move it to the network, it is readable and writeable by everybody without me having to change it's permissions?

    Sounds like you are not using ACLs.  When you double click your share point in Server.app, how many entries do you have in the Permissions window?  If you have only 3 then you are not using ACLs which explains why your permissions are not inheriting.  POSIX permissions, the base three of owner, group, and everyone, do not inherit.  You need to add at least one more permission entry to the table.  This is called an ACE (access control entry).  Together, you are building an ACL (access control list).  Try not to use users.  Always add groups if possible as it is easier to manage and never requires propagation of the permissions.
    R-
    Apple Consulting Network
    Apple Professional Services
    Author "Mavericks Server – Foundation Services" :: Exclusively available in Apple's iBooks Store

  • I am unable to to publish to BC i keep getting a type error:  Don't know how to generate rendered data for type.  Can someone help me fix this?

    Been having this problem all day now. i just installed the new version

    Can you please send an email to us at [email protected] along with a link to this thread and the .muse file? You can upload it to Adobe Send or Dropbox and include a download link. Thanks!

  • How do I skip footer records in Data file through control file of sql*loade

    hi,
    I am using sql*loader to load data from data file and i have written control file for it. How do i skip last '5' records of data file or the footer records to be skiped to read.
    For first '5' records to be skiped we can use "skip" to achieve it but how do i acheive for last '5' records.
    2)
    Can I mention two data files in one control file if so what is the syntax(like we give INFILE Where we mention the path of data file can i mention two data file in same control file)
    3)
    If i have datafile with variable length (ie 1st record with 200 charcter, 2nd with 150 character and 3rd with 180 character) then how do i load data into table, i mean what will be the syntax for it in control file.
    4)if i want to insert sysdate into table through control file how do i do it.
    5) If i have variable length records in data file and i have first name then white space between then and then last name, how do i insert this value which includes first name and last name into single column of the table.( i mean how do you handle the white space in between first name and last name in data file)
    Thanks in advance
    ram

    You should read the documentation about SQL*Loader.

  • Issue with passing schema name as variable to sql file

    Hi,
    I have a scenario wherein from SYS a Java process (Process_1) is invoking SQL files and executing the same in SQLPLUS mode.
    DB: Oracle 11.2.3.0
    Platform: Oracle Linux 5 (64-bit)
    Call_1.sql is being invoked by Java which contains the below content:-
    ALTER SESSION SET CURRENT_SCHEMA=&&1;
    UPDATE <table1> SET <Column1> = &&1;
    COMMIT;
    @Filename_1.sql
    Another process (Process_2) again from SYS user is also accessing Filename_1.sql.
    The content of Filename_1.sql is:-
    DECLARE
    cnt NUMBER := 0;
    BEGIN
      SELECT COUNT(1) INTO cnt FROM all_tables WHERE table_name = 'TEST' AND owner = '&Schema_name';
      IF cnt = 1 THEN
      BEGIN
        EXECUTE IMMEDIATE 'DROP TABLE TEST';
        dbms_output.put_line('Table dropped with success');
      END;
      END IF;
      SELECT COUNT(1) INTO cnt FROM all_tables WHERE table_name = 'TEST' AND owner = '&Schema_name';
      IF cnt = 0 THEN
      BEGIN
        EXECUTE IMMEDIATE 'CREATE TABLE TEST (name VARCHAR2(100) , ID NUMBER)';
        dbms_output.put_line('Table created with success');
      END;
      END IF;
    End;
    Process_2 uses "&Schema_Name" identifier to populate the owner name in Filename_1.sql. But Process_1 needs to use "&&1" to populate the owner name. This is where I am looking a way to modify Call_1.sql file so that it can accommodate both "&&1"  to populate owner name values in Filename_1.sql (with avoiding making any changes to Filename_1.sql).
    Any help would be appreciated.
    Thanks.

    Bad day for good code. Have yet to spot any posted today... Sadly, yours is just another ugly hack.
    The appropriate method for using SQL*Plus substitution variables (in an automated fashion), is as command line parameters. Not as static/global variables defined by some other script ran prior.
    So if a script is, for example, to create a schema, it should look something as follows:
    -- usage: create-schema.sql <schema_name>
    set verify off
    set define on
    create user &1 identified by .. default tablespace .. quota ... ;
    grant ... to &1;
    --eof
    If script 1 wants to call it direct then:
    -- script 1
    @create-schema SCOTT
    If script 2 want to call it using an existing variable:
    -- script 2
    @create-schema &SCHEMA
    Please - when hacking in this fashion, make an attempt to understand why the hack is needed and how it works. (and yes, the majority of SQL*Plus scripts fall into the CLI hack category). There's nothing simple, beautiful, or elegant about SQL*Plus scripts and their mainframe roots.

  • How to define MDM real data type in ABAP ?

    Hi,
    I want to fetch MDM Repository data using MDM API .
    I am strugling as one field in MDM is of real type .
    Please tell me how I could define Real data type field in ABAP ?
    Thanks.
    Sandesh

    I recently had a Real type added to a repository I'm working on and noticed a dump in the API itself when trying to fetch data from that field. I'm running 5.5 so you may be experiencing a different issue. I haven't resolved the issue yet as it isn't a priority but I will most likely move to a string field and just ensure that the field has its decimal rule respected logically.

Maybe you are looking for

  • Customer Exit for sales order Incompletion Procedure

    Hi, We have a requirement where we require to disable the incompletion log check on net price when a certain free goods condition exists in the sales order pricing.  We are unable to do this using standard configuration. Is there a user-exit we can u

  • Spatial Index Creation Problem - 11g

    Dear all, I have a customer with a problem creating a spatial index in her database. The thing is, she is also storing rasters in the database in a different schema and those indices are created OK. Also in 2 other databases, mine & another consultan

  • Can iTunes give audio notification when device sync finishes?

    I'd like to get audio feedback when my device sync completes. So far, I haven't found any setting in Mavericks setting or in iTunes settings to do configure it to make a sound when it finished syncing. Is there something that I missed, or is it impos

  • Can a Shared USB Printer be an IP Printer too?

    Apologies if this is a FAQ that was already answered somewhere else, I did look but couldn't find the answer here. I have a local LAN with addresses 192.168.1.x. Some clients are static IP addresses like .101, .102, and DHCP is also served up to new

  • Wmode transparent and blend mode problem

    Dear all, I'm stuck with this problem so far, got headache after searching many days on google without solution. Our designer using blend mode: screen (in flash) for some movies and the flash's transparent to save the file size display and then ưe ar