Sponsored Content
Homework and Emergencies Homework & Coursework Questions Help with pivoting table shell script Post 302978811 by senmatrix on Thursday 4th of August 2016 08:16:36 AM
Old 08-04-2016
not matching my requirement ,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading a table in a shell script

Dear all: I want to write a script capable of reading specific rows and collumns of a table, into a variable. Just imagine i have a file named table.dat which contains: GENERAL INFORMATION Col 1 Col2 Col3 1 1 2 2 3 3 4 4 What i want to do... (13 Replies)
Discussion started by: luiscarvalheiro
13 Replies

2. Shell Programming and Scripting

Alter Table Shell Script

I want to add some columns to a existing tables through a shell script. Please help. (2 Replies)
Discussion started by: ankitgupta
2 Replies

3. Shell Programming and Scripting

To update a column in a table through shell script

Hi All, I need to write a shell script in UNIX that should accept booking number as an argument and update it with value "NULL" if the transaction date is greater than 2 years. Booking number and transaction_date are the two columns of the table table_booking. Something like this, through... (3 Replies)
Discussion started by: shilpa_acc
3 Replies

4. Shell Programming and Scripting

Truncating table from a shell script

I am trying to truncate a table using below script. When I ran the script it runs fine but table was not truncated and the spool is empty. I am not sure what is wrong with pl/sql block. #!/bin/ksh # ---------------------------------------------------------------------- # # Created by: XXXX... (2 Replies)
Discussion started by: gunaah
2 Replies

5. Shell Programming and Scripting

Create DB table through shell script

Hi, Can anyone tell me that, How to create table in Oracle database through shell script(ksh). Table contains 3 fields, 1] Emp ID, String, primary key 2] Name, String 3] B Date, date. Thanks in advance. (6 Replies)
Discussion started by: Poonamol
6 Replies

6. Shell Programming and Scripting

Shell script to query Oracle table

Hi, unix gurnis I need help for following requirement for writing a shell scritp. log in to oracle database, query one table total records (select count(*) from table1), pass the return value to a file. Thanks in advance (2 Replies)
Discussion started by: ken002
2 Replies

7. Shell Programming and Scripting

Transposing rows and columns (pivoting) using shell scripting

Here is the contents of an input file. A,1,2,3,4 10,aaa,bbb,ccc,ddd 11,eee,fff,ggg,hhh 12,iii,jjj,lll,mmm 13,nnn,ooo,ppp I wanted the output to be A 10 1 aaa 10 2 bbb 10 3 ccc 10 4 ddd 11 1 eee 11 2 fff 11 3 ggg 11 4 hhh ..... and so on How to do it in ksh... (9 Replies)
Discussion started by: ksatish89
9 Replies

8. Shell Programming and Scripting

Shell Script Table

Hi, i need a bit help. I must write a script with shell- and sed-commands, which reads a table from stdin and writes a html-table on stdout (so i can open it with a web browser). The number of columns must be a parameter for the script, so i can start it for example with: "./htmltab.sh 3... (3 Replies)
Discussion started by: scruffytramp
3 Replies

9. Shell Programming and Scripting

Pivoting using shell scripts

Hi , Please any one help using shell scripts achieve the below output(pivoting on top_cd i mean type code values will come as individual columns and fixed amount is value for that .Any help would be greate tx_id tx_amt typ_cd fixed_dis_amt 100 200 mc ... (3 Replies)
Discussion started by: mohan705
3 Replies

10. Shell Programming and Scripting

Download a db table through UNIX shell script

Hi, I'm an amateur and need your help in figuring this out. I have been asked to connect to a prod db from non-prod env., and download a table from prod db to non-prod env. I was able to connect to the prod db and then run a simple query as below. @@@@@@@@@@ ... (7 Replies)
Discussion started by: arunpvp
7 Replies
Version::Requirements(3pm)				 Perl Programmers Reference Guide				Version::Requirements(3pm)

NAME
Version::Requirements - a set of version requirements for a CPAN dist VERSION
version 0.101022 SYNOPSIS
use Version::Requirements; my $build_requires = Version::Requirements->new; $build_requires->add_minimum('Library::Foo' => 1.208); $build_requires->add_minimum('Library::Foo' => 2.602); $build_requires->add_minimum('Module::Bar' => 'v1.2.3'); $METAyml->{build_requires} = $build_requires->as_string_hash; DESCRIPTION
A Version::Requirements object models a set of version constraints like those specified in the META.yml or META.json files in CPAN distributions. It can be built up by adding more and more constraints, and it will reduce them to the simplest representation. Logically impossible constraints will be identified immediately by thrown exceptions. METHODS
new my $req = Version::Requirements->new; This returns a new Version::Requirements object. It ignores any arguments given. add_minimum $req->add_minimum( $module => $version ); This adds a new minimum version requirement. If the new requirement is redundant to the existing specification, this has no effect. Minimum requirements are inclusive. $version is required, along with any greater version number. This method returns the requirements object. add_maximum $req->add_maximum( $module => $version ); This adds a new maximum version requirement. If the new requirement is redundant to the existing specification, this has no effect. Maximum requirements are inclusive. No version strictly greater than the given version is allowed. This method returns the requirements object. add_exclusion $req->add_exclusion( $module => $version ); This adds a new excluded version. For example, you might use these three method calls: $req->add_minimum( $module => '1.00' ); $req->add_maximum( $module => '1.82' ); $req->add_exclusion( $module => '1.75' ); Any version between 1.00 and 1.82 inclusive would be acceptable, except for 1.75. This method returns the requirements object. exact_version $req->exact_version( $module => $version ); This sets the version required for the given module to exactly the given version. No other version would be considered acceptable. This method returns the requirements object. add_requirements $req->add_requirements( $another_req_object ); This method adds all the requirements in the given Version::Requirements object to the requirements object on which it was called. If there are any conflicts, an exception is thrown. This method returns the requirements object. accepts_module my $bool = $req->accepts_modules($module => $version); Given an module and version, this method returns true if the version specification for the module accepts the provided version. In other words, given: Module => '>= 1.00, < 2.00' We will accept 1.00 and 1.75 but not 0.50 or 2.00. For modules that do not appear in the requirements, this method will return true. clear_requirement $req->clear_requirement( $module ); This removes the requirement for a given module from the object. This method returns the requirements object. required_modules This method returns a list of all the modules for which requirements have been specified. clone $req->clone; This method returns a clone of the invocant. The clone and the original object can then be changed independent of one another. is_simple This method returns true if and only if all requirements are inclusive minimums -- that is, if their string expression is just the version number. is_finalized This method returns true if the requirements have been finalized by having the "finalize" method called on them. finalize This method marks the requirements finalized. Subsequent attempts to change the requirements will be fatal, if they would result in a change. If they would not alter the requirements, they have no effect. If a finalized set of requirements is cloned, the cloned requirements are not also finalized. as_string_hash This returns a reference to a hash describing the requirements using the strings in the META.yml specification. For example after the following program: my $req = Version::Requirements->new; $req->add_minimum('Version::Requirements' => 0.102); $req->add_minimum('Library::Foo' => 1.208); $req->add_maximum('Library::Foo' => 2.602); $req->add_minimum('Module::Bar' => 'v1.2.3'); $req->add_exclusion('Module::Bar' => 'v1.2.8'); $req->exact_version('Xyzzy' => '6.01'); my $hashref = $req->as_string_hash; $hashref would contain: { 'Version::Requirements' => '0.102', 'Library::Foo' => '>= 1.208, <= 2.206', 'Module::Bar' => '>= v1.2.3, != v1.2.8', 'Xyzzy' => '== 6.01', } from_string_hash my $req = Version::Requirements->from_string_hash( \%hash ); This is an alternate constructor for a Version::Requirements object. It takes a hash of module names and version requirement strings and returns a new Version::Requirements object. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.16.2 2012-10-25 Version::Requirements(3pm)
All times are GMT -4. The time now is 10:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy