06-04-2009
One way is to use sqlloader to load the data in a table and validate the data with SQL.
Google for sqlloader if you don't have experience with it.
Regards
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi i have a file as follows:
1
2
3
4
5
6
i want to store all these numbers in an array using awk.. so far i have:
awk '{for(i=1;i<=NR;i++) {a=$1}} END {for(i=1;i<=NR;i++) {printf("%1.11f",a)}}' 1.csv > test
however, i am getting all values as zero in the "test" file..... (3 Replies)
Discussion started by: npatwardhan
3 Replies
2. Shell Programming and Scripting
hi i am trying to save values in a file in an array in awk..the file is as follows:
0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,
so far i have this:
awk 'BEGIN {RS="\n";FS=","}
{
for(i=1;i<=NR;i++)
{
for(j=1;j<=NF;j++)
{
a=$j;
}
} (4 Replies)
Discussion started by: npatwardhan
4 Replies
3. Shell Programming and Scripting
i have a file called file.txt having the following entries.
2321
2311
2313
4213
i wnat to store these values in a list and i want to iterate the list using loop and store it in another list (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies
4. Shell Programming and Scripting
I'm at wits end with this issue and my troubleshooting leads me to believe it is a problem with the file formatting of the array referenced by my script:
awk -F, '{if (NR==FNR) {a=$4","$3","$2}\
else {print a "," $0}}' WBTSassignments1.txt RNCalarms.tmp
On the WBTSassignments1.txt file... (2 Replies)
Discussion started by: JasonHamm
2 Replies
5. Shell Programming and Scripting
#ksh
Here is my code:
ERRORLIST="43032 12001 12002 12003 12004 34019 49015 49016 49017 49018 49024 49025 49026 58004 72003 12005 12006 12007 12008 12011 12012 16024 16023"
for ERROR in ${ERRORLIST}
do
awk -v l="$lastdate" '/^....-..-../&&$0>l{d=$0}d&&/Error: '"${ERROR}"'/{print... (3 Replies)
Discussion started by: k1ko
3 Replies
6. Shell Programming and Scripting
Hi,
I have a perl script abc.pl..
#!/usr/bin/perl
local ($buffer, @pairs, $pair, $name, $value, %FORM);
# Read in text
$ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;
if ($ENV{'REQUEST_METHOD'} eq "POST")
{
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}else {... (3 Replies)
Discussion started by: puneetkanchi
3 Replies
7. Shell Programming and Scripting
I have a file like this
############################################
# ParentFolder Flag SubFolders
Colateral 1 Source1/Checksum
CVA 1 Source1/Checksum
Test 1 VaR/Checksum
Test2 1 SVaR/Checksum
FX 1 ... (6 Replies)
Discussion started by: manas_ranjan
6 Replies
8. Shell Programming and Scripting
Disclaimer: OP is 100% Awk beginner.
I use this code on ASCII files I need to report against.
awk 'BEGIN {
tokens = 0
tokens = 0
tokens = 0
}
{ for (token in tokens)
{ if ($1 == token){print $0; tokens++;}}}
END {for (token in tokens){
if( tokens ==... (1 Reply)
Discussion started by: alan
1 Replies
9. Shell Programming and Scripting
Am using a find command in my script .The output may be one or more. I need to store those values in a array and need to access those. Am unable to find the solution . Any help on this will be helpful.
if
< code>
else a=<find command output which gives the file name either 1 or more>
if 1... (1 Reply)
Discussion started by: rogerben
1 Replies
10. Shell Programming and Scripting
I have a string like below. Now i want to split this string like below and put the value in the array using awk. I am able to do it using bash but getting no clue for doing it in awk
O/P
A=0
A=01
A=014
A=0143
A=01438
A=014387
A=0143876
A=01438765
A=014387650
... (7 Replies)
Discussion started by: siramitsharma
7 Replies
LEARN ABOUT SUSE
sql::statement::termfactory
SQL::Statement::TermFactory(3) User Contributed Perl Documentation SQL::Statement::TermFactory(3)
NAME
SQL::Statement::TermFactory - Factory for SQL::Statement::Term instances
SYNOPSIS
my $termFactory = SQL::Statement::TermFactory->new($stmt);
my $whereTerms = $termFactory->buildCondition( $stmt->{where_clause} );
my $col = $termFactory->buildCondition( $stmt->{col_obj}->{$name}->{content} );
DESCRIPTION
This package implements a factory to create type and operation based terms. Those terms are used to access data from the table(s) - either
when evaluating the where clause or returning column data.
The concept of a factory can be studied in Design Patterns by the Gang of Four. The concept of using polymophism instead of conditions is
suggested by Martin Fowler in his book Refactoring.
METHODS
buildCondition
Builds a condition object from a given (part of a) where clause. This method calls itself recursively for predicates.
AUTHOR AND COPYRIGHT
Copyright (c) 2001,2005 by Jeff Zucker: jzuckerATcpan.org Copyright (c) 2008-2010 by Jens Rehsack: rehsackATcpan.org
Portions Copyright (C) 1998 by Jochen Wiedmann: jwiedATcpan.org
All rights reserved.
You may distribute this module under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl
README file.
perl v5.12.1 2010-05-06 SQL::Statement::TermFactory(3)