Sponsored Content
Top Forums Shell Programming and Scripting sql loader for inserting the data from multiple fields from unix Post 302338924 by panyam on Wednesday 29th of July 2009 09:30:29 AM
Old 07-29-2009
To be frank it's a oracle question :

How ever some thing like this you can try :
Code:
LOAD DATA
INFILE 'D:\work\load.txt'

INTO TABLE sample 

(col1         POSITION(02:24)   char,
col2         POSITION(27:32)   INTEGER EXTERNAL,
col3          POSITION(35:57)   CHAR,
col4          POSITION(60:68)   INTEGER EXTERNAL
)

Here i assumed that , the format of your log file remains same.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Bus error(coredump) while running SQL*Loader in HP Unix 11

Hi All, I am getting coredump error, when I try to execute Oracle SQL*Loader from Shell script in Unix environment. But SQL*Loader from local machine runs fine with same database. SQL*Loader: Release 9.2.0.6.0 - Production on Mon Apr 23 05:23:47 2007 Copyright (c) 1982, 2002, Oracle... (3 Replies)
Discussion started by: srinivas_paluku
3 Replies

2. Shell Programming and Scripting

how to handle sql loader errors in unix

hi all, how to handle sql loader errors in unix shell ?? thanks in advance gemini (3 Replies)
Discussion started by: gemini106
3 Replies

3. Shell Programming and Scripting

SQL*Loader in shellscript

Hi, what is the ideal format of the file to load it into oracle table by using SQL*LOADER. The file contains six columns and the oracle table contains 15 columns. Is there any criteria that columns should be equal in no.? Can anyone help me on this, i need to use this in my shell script? ... (2 Replies)
Discussion started by: venkatesht
2 Replies

4. Shell Programming and Scripting

How to use sql data file in unix csv file as input to an sql query from shell

Hi , I used the below script to get the sql data into csv file using unix scripting. I m getting the output into an output file but the output file is not displayed in a separe columns . #!/bin/ksh export FILE_PATH=/maav/home/xyz/abc/ rm $FILE_PATH/sample.csv sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies

5. UNIX for Dummies Questions & Answers

SQL*Loader

HI Experts, We have a ksh file named ldr_empdelta.ksh and it is having the SQL*LOADER script as follows. print "LOAD DATA" > $WEDB_GEN/ldrscan.ctl print "INFILE '"$LED_SCAN"/delta/led_del.dat'" >> $WEDB_GEN/ldrparms.ctl print "TRUNCATE" >> $WEDB_GEN/ldrscan.ctl print "PRESERVE BLANKS" >>... (1 Reply)
Discussion started by: ajaykumarkona
1 Replies

6. Shell Programming and Scripting

use of sql loader in the script

All, Below is the code written when sql loader loads the data: $ORACLE_EXEC_PATH/sqlldr userid=$user_passwd control=$CNTR_FILES/invoice.ctl log=$LOG_FILES/$INVOICE_FILE.log bad=$ER ROR_FILES/$INVOICE_FILE.bad data=$DATA_FILES/$INVOICE_FILE silent=FEEDBACK direct=false errors=50000 rc=$?... (1 Reply)
Discussion started by: Oracle_User
1 Replies

7. Homework & Coursework Questions

Write a shell script for SQL loader to load data into a staging table

Hi, I'm new to Linux. I'm working on a database, and need to load data in a database table (which I already created) using shell script. The table has two columns - Acct_number (not nullable) and date (timestamp). I'm not able to write a shell script for that. Can any one help me? ... (3 Replies)
Discussion started by: saisudeep
3 Replies

8. Shell Programming and Scripting

Create Multiple UNIX Files for Multiple SQL Rows output

Dear All, I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File. The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files. Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies

9. UNIX for Dummies Questions & Answers

Call SQL LOADER FROM UNIX

HI Experts, I am pretty new to scripting and i need to create a perl or shell script which should fetch a file from local directory and insert the data into a table using sql loader. This will be later added to chron job to run daily and fetch all files and load them into the table. Also i... (1 Reply)
Discussion started by: sam1234
1 Replies

10. UNIX for Dummies Questions & Answers

Call SQL LOADER FROM UNIX

HI Experts, I am pretty new to scripting and i need to create a perl or shell script which should fetch a file from local directory and insert the data into a table using sql loader. This will be later added to chron job to run daily and fetch all files and load them into the table. Also i... (1 Reply)
Discussion started by: sam1234
1 Replies
LaTeX::Table::Types::TypeI(3pm) 			User Contributed Perl Documentation			   LaTeX::Table::Types::TypeI(3pm)

NAME
LaTeX::Table::Types::TypeI - Interface for LaTeX table types. DESCRIPTION
This is the type interface (or Moose role), that all type objects must use. LaTeX::Table delegates the LaTeX code generation to type objects. It stores all information we have in easy to use "TEMPLATE VARIABLES". LaTeX::Table ships with very flexible templates, but it is possible to use the template variables defined here to build custom templates. INTERFACE
"generate_latex_code" TEMPLATE VARIABLES
Most options are accessible here: "CENTER, LEFT, RIGHT" Example: [% IF CENTER %]centering [% END %] "ENVIRONMENT, STAR, POSITION, SIDEWAYS" These options for floating environments are typically used like: [% IF ENVIRONMENT %]egin{[% ENVIRONMENT %][% IF STAR %]*[% END %]}[% IF POSITION %][[% POSITION %]][% END %] ... [% END %] # the tabular environment here ... [% IF ENVIRONMENT %] ... end{[% ENVIRONMENT %][% IF STAR %]*[% END %]}[% END %] "CAPTION_TOP, CAPTION_CMD, SHORTCAPTION, CAPTION, CONTINUED, CONTINUEDMSG" The variables to build the caption command. Note that there is NO template for the "maincaption" option. "CAPTION" already includes this maincaption if specified. "LABEL" The label: [% IF LABEL %]label{[% LABEL %]}[% END %] "TABULAR_ENVIRONMENT, WIDTH, COLDEF" These three options define the tabular environment: egin{[% TABULAR_ENVIRONMENT %]}[% IF WIDTH %]{[% WIDTH %]}[% END %]{[% COLDEF %]} "FONTFAMILY, FONTSIZE" Example: [% IF FONTSIZE %][% FONTSIZE %] [% END %][% IF FONTFAMILY %][% FONTFAMILY %]family [% END %] "TABLEHEADMSG, TABLETAIL, TABLELASTTAIL, XENTRYSTRETCH" For the multi-page tables. "MAXWIDTH, FOOTTABLE" Currently only used by LaTeX::Table::Types::Ctable. In addition, some variables already contain formatted LaTeX code: "HEADER_CODE" The formatted header: oprule multicolumn{2}{c}{Item} & \ cmidrule(r){1-2} Animal & Description & Price \ midrule "DATA_CODE" The formatted data: Gnat & per gram & 13.65 \ & each & 0.01 \ Gnu & stuffed & 92.59 \ Emu & stuffed & 33.33 \ Armadillo & frozen & 8.99 \ ottomrule "RESIZEBOX_BEGIN_CODE, RESIZEBOX_END_CODE" Everything between these two template variables is resized according the "resizebox" option. "EXTRA_ROW_HEIGHT_CODE, DEFINE_COLORS_CODE, RULES_COLOR_GLOBAL_CODE, RULES_WIDTH_GLOBAL_CODE" Specified by the theme. "EXTRA_ROW_HEIGHT_CODE" will contain the corresponding LaTeX extrarowheight command, e.g for '1pt': setlength{extrarowheight}{1pt} Otherwise it will contain the empty string. The other template variables will contain the command specified by the corresponding theme option. Finally, some variables allow access to internal "LaTeX::Table" variables: "LT_NUM_COLUMNS" Contains the number of columns of the table. "LT_BOTTOM_RULE_CODE" Code that draws the rules at the bottom of the table according the theme options. SEE ALSO
LaTeX::Table The predefined templates: LaTeX::Table::Types::Std, LaTeX::Table::Types::Ctable, LaTeX::Table::Types::Longtable, LaTeX::Table::Types::Xtab LICENSE AND COPYRIGHT
Copyright (c) 2006-2010 "<limaone@cpan.org>" This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. perl v5.10.1 2010-10-27 LaTeX::Table::Types::TypeI(3pm)
All times are GMT -4. The time now is 07:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy