Hello,
I am new to db2 SQL in unix so bear with me while I try to explain the situation. I have a text file that has the contents of the where condition that I am using for a db2 SQL in UNIX ksh.
Here is the snippet.
if ;
then
echo "Begin processing VALUEs"
... (1 Reply)
Hi,
I have a file with below contents.
Heading1 Heading2 Heading3 Heading4
Value1 Value2 Value3 Value4
The file has only 2 rows and is tab separated
The desired output is :
Heading1 Value1
Heading2 Value2
Heading3 Value3
Heading4 Value4
CAn you please help? (5 Replies)
Hi,
I have a problem where I need to make this input:
nameRow1a,text1a,text2a,floatValue1a,FloatValue2a,...,floatValue140a
nameRow1b,text1b,text2b,floatValue1b,FloatValue2b,...,floatValue140b
look like this output:
nameRow1a,text1b,text2a,(floatValue1a - floatValue1b),(floatValue2a -... (4 Replies)
hi,
I am basically running a sql that returns me values and I have stored them to a variable for example value of the variable will be:
123 124 345
now I want to write values stored in the variable into a file as
123
124
345
thanks in advance (3 Replies)
Hi Experts,
I have a requirement to convert rows into columns.
For e.g.
Input File:
Output File should be like
Appreciate if you could suggest code snippet(may be awk) for above requirement...
Thanks in Advance for your help... (3 Replies)
Hi all ,
I have a file with the below content
Header Section
employee|employee name||Job description|Job code|Unitcode|Account|geography|C1|C2|C3|C4|C5|C6|C7|C8|C9|Csource|Oct|Nov|Dec|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep
Data section ... (1 Reply)
Dear Team
I am using DB2 v9 .
I have a condition to check roles based on hierarchies like below example.
1.Ramesh has Roles as "Manager" and "Interviewer"
2.KITS has Roles as "Interviewer"
3.ANAND has Roles as "Manager" and "Interviewer"
select * FROM TESTING
NAME ... (6 Replies)
I am using DB2 v9 and trying to get country values in comma seperated format using below query
SELECT distinct LISTAGG(COUNTRIES, ',') WITHIN GROUP(ORDER BY EMPLOYEE)
FROM LOCATION ;
Output Achieved
MEXICO,UNITED STATES,INDIA,JAPAN,UNITED KINGDOM,MEXICO,UNITED STATES
The table... (4 Replies)
Discussion started by: Perlbaby
4 Replies
LEARN ABOUT DEBIAN
class::dbi::query
Class::DBI::Query(3pm) User Contributed Perl Documentation Class::DBI::Query(3pm)NAME
Class::DBI::Query - Deprecated SQL manager for Class::DBI
SYNOPSIS
my $sth = Class::DBI::Query
->new({
owner => $class,
sqlname => $type,
essential => @columns,
where_columns => @where_cols,
})
->run($val);
DESCRIPTION
This abstracts away many of the details of the Class::DBI underlying SQL mechanism. For the most part you probably don't want to be
interfacing directly with this.
The underlying mechanisms are not yet stable, and are subject to change at any time.
OPTIONS
A Query can have many options set before executing. Most can either be passed as an option to new(), or set later if you are building the
query up dynamically:
owner
The Class::DBI subclass that 'owns' this query. In the vast majority of cases a query will return objects - the owner is the class of which
instances will be returned.
sqlname
This should be the name of a query set up using set_sql.
where_clause
This is the raw SQL that will substituted into the 'WHERE %s' in your query. If you have multiple %s's in your query then you should supply
a listref of where_clauses. This SQL can include placeholders, which will be used when you call run().
essential
When retrieving rows from the database that match the WHERE clause of the query, these are the columns that we fetch back and pre-load the
resulting objects with. By default this is the Essential column group of the owner class.
METHODS
where()
$query->where($match, @columns);
This will extend your 'WHERE' clause by adding a 'AND $column = ?' (or whatever $match is, isntead of "=") for each column passed. If you
have multiple WHERE clauses this will extend the last one.
perl v5.12.4 2004-04-25 Class::DBI::Query(3pm)