Hi
I need to execute a select statement in a solaris environment with oracle database. The select statement returns number of rows of data.
I need the data to be inserted into a CSV file with proper format. For that we normally use "You have to select all your columns as one big string,... (2 Replies)
hi there, I am trying to create a stored procedure that i can pass the table name to and it will create a table with that name. but for some reason it creates with what i have defined as the variable name . In the case of the example below it creates a table called 'tname'
for example
... (6 Replies)
I need to compare the 2 mysql database tables. there are around 50 tables in each DB.
my idea is
in DB1
extract result select * from table1; to alog file1
in DB2
extract result select * from table1; to alog file2
now compare log file 1 file 2
pls help me out ...
thanks in advance (5 Replies)
Hi,
I've several files with two collumns, where first collumn can be used as index.
filename1
and filename2
how to create a file
I should start with cat all files and extract first collumn to create an index? (4 Replies)
I basically need to do what the title says.
I have my text file.
I'm still pretty new at this.
At the moment I know that:
1. wc -l file.txt
To get the number of lines.
2. ls -lh file.txt
To get the file size.
But I need to divide both numbers. Then I need to save the output in a... (7 Replies)
Hi Team,
I need to create a control file with a pre-defined structure for a given table name. The table is in teradata.
Ex: Table Name: TBL1
Table structure:
create multiset table tbl1, no fallback,
no before journal,
no after journal,
checksum = default,
default mergeblockratio... (7 Replies)
I need to create the shell script load the few 100 table using the SQLLDR.
Need to generate the control file for each table using oracle table.
table has "table names" and "column names" using this need create the control file.
example table rows below
table_nme column_nme
DEPT ... (2 Replies)
Gents,
Can you please help me to create a pivot table from a csv file. ( I have zip the csv file)
Using the file attached, columns 1,28 and 21 i would like to get something like this output
JD Val 1 2 3 4 5 6 7 8 9 10 11 12 Total... (4 Replies)
Hello,
In my shell script, I extract table data from HP Vertica DB into a csv file using vsql -c command. But the problem is the file getting created is in binary format and hence some of the data becomes unreadable which has chinese characters as part of data.
file -i filename.csv - gives... (2 Replies)
Discussion started by: Dharmatheja
2 Replies
LEARN ABOUT SUSE
file::type
File::Type(3) User Contributed Perl Documentation File::Type(3)NAME
File::Type - determine file type using magic
SYNOPSIS
my $ft = File::Type->new();
# read in data from file to $data, then
my $type_from_data = $ft->checktype_contents($data);
# alternatively, check file from disk
my $type_from_file = $ft->checktype_filename($file);
# convenient method for checking either a file or data
my $type_1 = $ft->mime_type($file);
my $type_2 = $ft->mime_type($data);
DESCRIPTION
File::Type uses magic numbers (typically at the start of a file) to determine the MIME type of that file.
File::Type can use either a filename, or file contents, to determine the type of a file.
METHODS
new
Returns a new File::Type object.
mime_type($argument)
Takes either data or a filename, determines what it is, and passes the argument through to the relevant method below. If the argument is a
directory, returns undef.
checktype_filename($filename)
Opens $filename (if possible; if not, returns undef) and returns the MIME type of the file.
checktype_contents($data)
Matches $data against the magic database criteria and returns the MIME type of the file.
TODO
* Add additional magic match criteria
BUGS
None known.
NOTES
Some magic definitions in the mime-magic file used in the creation of this module vary from those in other apps (eg image/x-png not
image/png).
SEE ALSO
File::MMagic and File::MimeInfo perform the same job, but have a number of problems that led to the creation of this module.
File::MMagic inlines a copy of the magic database, and uses a DATA filehandle, which causes problems when running under mod_perl.
File::MimeInfo uses an external magic file, and relies on file extensions rather than magic to determine the mime type.
As a result, File::Type uses a seperate module and script to create the code at the core of this module, which means that there is no need
to include a magic database at all, and that it is safe to run under mod_perl.
File::Type::Builder, which generates the code at the heart of this module.
ACKNOWLEDGMENTS
File::Type is built from a mime-magic file from cleancode.org. The original can be found at
http://cleancode.org/cgi-bin/viewcvs.cgi/email/mime-magic.mime?rev=1.1.1.1 <http://cleancode.org/cgi-bin/viewcvs.cgi/email/mime-
magic.mime?rev=1.1.1.1>.
AUTHOR
Paul Mison <pmison@fotango.com>
COPYRIGHT
Copyright 2003-2004 Fotango Ltd.
LICENSE
Licensed under the same terms as Perl itself.
perl v5.12.1 2004-05-06 File::Type(3)