Sponsored Content
Full Discussion: Not able to insert data
Operating Systems Solaris Not able to insert data Post 302264795 by megh on Thursday 4th of December 2008 10:47:11 PM
Old 12-04-2008
Not able to insert data

Hi All,
I enhanced a perl script that creates a table with xyz_yyyymm and insert data from xyz table before truncate xyz.I have tested it successfully in dev but when i ran it on production new table xyz_yyyymm created but did not insert any records from xyz.(No errors were thrown)The perl ran successfully.

Can any one suggest what to do


$sql="select sys_value from syscntrl where sys_typ in ('EOM')";
exec_sql();
$eom=$sth->fetchrow_array();
$sql="create table acct_dnb_$eom unrecoverable as select * from acct_dnb";
exec_sql() ;
$sql="select count(*) from acct_dnb_$eom";
exec_sql();
$rows_returned=$sth->fetchrow_array();
sub exec_sql{
$sth=$dbh->prepare($sql) or mail_abort("dnb_portfolio.pl","cant prepare:\n$sql\n");
$sth->execute or mail_abort("dnb_portfolio.pl","\n$DBI::errstr\n$sql");
}

Regards
Megh

Last edited by megh; 12-05-2008 at 02:02 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed, insert data from a file to another?

Hello, I have 2 files. File1 has data I wrote, and File2 is a file created by an application. I would like to insert the data from File1 into File2, but it has to be inserted at a certain location on File2. I know I need to search for "</jsp-param> </jsp-descriptor>" But I don't know... (4 Replies)
Discussion started by: ctcuser
4 Replies

2. UNIX for Dummies Questions & Answers

help me to to insert data

hi, am new to unix can any one help me to insert data to afile to a specified column. ie to an output file with csv format i should insert some data to 2,3,4 fileds and the data in those fields should move to next fields eg: output file asd,12,12,12,12,1,2,1,1,1,1,1... (10 Replies)
Discussion started by: babu@shell
10 Replies

3. Shell Programming and Scripting

How to insert data befor some field in a row of data depending up on values in row

Hi I need to do some thing like "find and insert before that " in a file which contains many records. This will be clear with the following example. The original data record should be some thing like this 60119827 RTMS_LOCATION_CDR INSTANT_POSITION_QUERY 1236574686123083rtmssrv7 ... (8 Replies)
Discussion started by: aemunathan
8 Replies

4. Shell Programming and Scripting

Awk: Data Insert

Hi guys, I'm having some difficulties in insert some details to the following contents. I need to insert "TEST" under MIR & a value "25" to the next line. So far, I am able to insert "TEST" by using awk to capture MIR as the identifier. However, I am having some difficulties in inserting "25"... (3 Replies)
Discussion started by: nantheless
3 Replies

5. Shell Programming and Scripting

insert data into specific lines of a CSV

So I work in a 1 to 1 laptop deployment and sometimes we need to mass order parts. The vendor will send us a text file and we have to manually input serial numbers. Well I have a full blown web based inventory system which I can pull serial number reports from. I then have to input the part... (4 Replies)
Discussion started by: tlarkin
4 Replies

6. Shell Programming and Scripting

Insert and shifting data at column

Hi all, i have data like this joe : 1 :a bob : 2 :b sue : 3 :c foo : 4 :d at column 2 i want to insert TOP to the top column and at column 3 i want to insert BOTTOM to the bottom column. and the result will... (12 Replies)
Discussion started by: psychop13
12 Replies

7. UNIX for Dummies Questions & Answers

How to insert data in a file at last?

Hi Am Using Unix ksh... I have file name called FILE1 Have a content in a FILE as 11/01/2012 12/07/2012 -- -- I have used one variable DATE=12/11/2012 I wants to insert DATE variable value at last line in a file I need Output as cat FILE1 11/01/2012 12/07/2012 -- (2 Replies)
Discussion started by: Venkatesh1
2 Replies

8. Shell Programming and Scripting

Parsing XML (and insert data) then output data (bash / Solaris)

Hi folks I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file. It all works - apart from the xml and config file format in the new file with XML files the original XML (that ends up in... (2 Replies)
Discussion started by: dfinch
2 Replies

9. Programming

Need help on Insert data to mySQL database

Hi guys, I would like to seek help on inserting data whenever the switch is on or off to my sensor mySQL database in phpMyAdmin from my control.php. I'm using Raspberry PI as my hardware and follow a few tutorials to create my own Web Control Interface, it works perfectly without insert method.... (1 Reply)
Discussion started by: aoiregion
1 Replies

10. Shell Programming and Scripting

Insert data based on pattern

if it is finding some data based on pattern 'test' then insert else if has no data based on the pattern 'test' then exit successfully cat file | grep test > file2 (3 Replies)
Discussion started by: jagu
3 Replies
DBIx::Class::Manual::Glossary(3)			User Contributed Perl Documentation			  DBIx::Class::Manual::Glossary(3)

NAME
DBIx::Class::Manual::Glossary - Clarification of terms used. INTRODUCTION
This document lists various terms used in DBIx::Class and attempts to explain them. DBIx::Class TERMS DB schema Refers to a single physical schema within an RDBMS. Synonymous with the terms 'database', for MySQL; and 'schema', for most other RDBMS(s). In other words, it's the 'xyz' _thing_ you're connecting to when using any of the following DSN(s): dbi:DriverName:xyz@hostname:port dbi:DriverName:database=xyz;host=hostname;port=port Inflation The act of turning database row data into objects in language-space. DBIx::Class result classes can be set up to inflate your data into perl objects which more usefully represent their contents. For example: DBIx::Class::InflateColumn::DateTime for datetime or timestamp column data. See also DBIx::Class::InflateColumn. Deflation The opposite of "Inflation". Existing perl objects that represent column values can be passed to DBIx::Class methods to store into the database. For example a DateTime object can be automatically deflated into a datetime string for insertion. See DBIx::Class::InflateColumn and other modules in that namespace. ORM Object-relational mapping, or Object-relationship modelling. Either way it's a method of mapping the contents of database tables (rows), to objects in programming-language-space. DBIx::Class is an ORM. Relationship In DBIx::Class a relationship defines the connection between exactly two tables. The relationship condition lists the columns in each table that contain the same values. It is used to output an SQL JOIN condition between the tables. Relationship bridge A relationship bridge, such as "many_to_many" defines an accessor to retrieve row contents across multiple relationships. The difference between a bridge and a relationship is, that the bridge cannot be used to "join" tables in a "search", instead its component relationships must be used. Schema A Schema object represents your entire table collection, plus the connection to the database. You can create one or more schema objects, connected to various databases, with various users, using the same set of table "Result class" definitions. At least one DBIx::Class::Schema class is needed per database. Result class A Result class defines both a source of data (usually one per table), and the methods that will be available in the "Row" objects created using that source. One Result class is needed per data source (table, view, query) used in your application, they should inherit from DBIx::Class::Core. ResultSource ResultSource objects represent the source of your data, these are sometimes (incorrectly) called table objects. ResultSources do not need to be directly created, a ResultSource instance is created for each "Result class" in your "Schema", by the proxied methods "table" and "add_columns". See also: "METHODS" in DBIx::Class::ResultSource ResultSet This is an object representing a set of conditions to filter data. It can either be an entire table, or the results of a query. The actual data is not held in the ResultSet, it is only a description of how to fetch the data. See also: "METHODS" in DBIx::Class::ResultSet Record See Row. Row Row objects contain your actual data. They are returned from ResultSet objects. Object See Row. join prefetch SQL TERMS
Join This is an SQL keyword, it is used to link multiple tables in one SQL statement. This enables us to fetch data from more than one table at once, or filter data based on content in another table, without having to issue multiple SQL queries. Normalisation A normalised database is a sane database. Each table contains only data belonging to one concept, related tables refer to the key field or fields of each other. Some links to webpages about normalisation can be found in DBIx::Class::Manual::FAQ. Related data In SQL, related data actually refers to data that are normalised into the same table. (Yes. DBIC does mis-use this term). perl v5.16.2 2012-10-18 DBIx::Class::Manual::Glossary(3)
All times are GMT -4. The time now is 06:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy