I am reading one table and creating an array that will be used many times.
The second Select returns values, if the pay-sum-grp value is found in the array I need to add the wage-amount to the variable $vGrossRG. I loop through all of the entries in this table for any match to a value in the...
I have opened the first connection and run a 'fetchrow_array'. When I used Perl on a UNIX/Oracle system I was able to link to other tables. I am now working on a Windows/SQL system and when I run this code (without the # at the start of the line),
# $st2 = $dbh->prepare("SELECT BIRTHDATE...
I have used DBI::Oracle in the past, but now I need to use DBI::SQLite and it seems the connection structure is different.
#### program variables
$dbsys = "spwdclwsntdb1";
$user = "lawsonpf";
$pass = "##########";
$dsn = "DBI:SQLite:dbname=$dbsys";
use DBI...
I know this is basic a stupid, am sorry.
I am retrieving a value from a table and I need to divide it by another value that I have retrieved.
The current code does not work.
# read POVAGRMTLN table
my $stmt = "SELECT POVAGRMTLN.BASE_COST
FROM LAWSON.POVAGRMTLN...
I am looping through a batch of data. I am creating a output header and detail record for each record that has a status of 112584.
After I creat the header and detail output records I want to change the status field from 112584 to 112586.
I do not want to effect the loop I am in. I think I...
I am trying to create a payment link using the Clickbank image
<p class="style1" align="center"> <a href="http://1.voge1047.pay.clickbank.net" <img src="images/button_2_medium.gif" height="100" width="275" /></a></p>
The result displays the Http link above the image and neither works...
I have a quantity field that I need toend up with in a field with a length of 14 places. the field is of a format 14.4 so I tried using
$vQty = sprintf("%014.4f", $data[7]);
The error I got was because I am not allowed to have a decimal point in the result.
How can I get the resuly...
I started out with this code,
CREATE OR REPLACE TRIGGER PROCURE."LAWSON_PRICE_CHG_TRG"
AFTER UPDATE OF "BASE_COST"
ON "LAWSON"."POVAGRMTLN"
REFERENCING NEW AS N OLD AS O
FOR EACH ROW
BEGIN
IF ( NOT (:O.BASE_COST = :N.BASE_COST))
THEN
INSERT into PROCURE.PRICE_CHG_LOG...
I need to format a field to have 4 decimal places.
I am using,
$vQty = sprintf("%0*d", 13, $data[7]);
it should be 9(09)V9(04)at least that is the format in Cobol.
I could do
$vQTY = $data[7]*10000;
$vQty = sprintf("%0*d", 13, $vQTY);
That would put the...
I am using a PL/SQL script to extract data and I am currently using,
and I.MATCH_DATE >= to_date('09/01/2011', 'MM/DD/YYYY')
and I.MATCH_DATE < to_date('10/01/2011', 'MM/DD/YYYY')
The second month is the current month and the starting month is last month. Can this be coded to...
I am adding a field to a record and the field has to be of a fixed width. I do this in Crystal Reports by using,
right(space (10) & ($vDes), 10)
That code adds ten spaces to the left of the variable, then fills the field from the right, so all extra spaces are dropped.
Is there a way to do the...
I have code that works, only it sends an end of process file ($vName2) even if no files were sent.
if (-e $vName1)
{
$rc=system("del /Q $vName1");
chdir ($dir);
opendir($dh, $dir) or die "can't opendir $dir: $!";
@files = readdir($dh);
$ftp=Net::FTP->new($host, Debug...
I have a string that sometimes contains spaces and the number of spaces varies. I know how to do this in Perl, but not in Java.
An example of the data is;
800,563751,L6441608-013 000039
120,563751,L557160-166 000044
There are only 3 values; company, vendor, invoice
I need to remove...
I am trying to test a table for a entry to see if it is there before I write the record.
$st2 = $dbh->prepare("SELECT * FROM procure.INVOICE_BLT WHERE
company = '" . $vCompstr . "' and
vendor = '" . $vVendor . "' and
invoice = '" . $vInvoice . "'")...
I have a select and then a delete function. The select works great, but the delete does not work. It also does not give an error. I checked and the user ID that I log into the DB with does have ownership and delete permission.
## read table procure.po_lease and process each entry
use DBI;
use...
I have a table PURCHORDER that is located in the schema LAWSON.
I had a trigger running on that table.
CREATE OR REPLACE TRIGGER PROCURE."LAWSON_PO_ISSUED_FLAG_UPD_TRG"
AFTER UPDATE OF "ISSUED_FLAG"
ON "LAWSON"."PURCHORDER"
REFERENCING NEW AS N OLD AS O
FOR EACH ROW
BEGIN
IF (...
Column D contains my old department number and I want the new department number to end up in column E. The conversion is old department in T2:T91 and the new department in V2:V91.
This formula works for the first row:
=LOOKUP(D2,T2:T91,V2:V91)
If I copy the formula from the second row to the...
I have a program HISEMAIL
#!/usr/lpp/oracle/product/10.2/perl/bin/perl
use MIME::Lite;
$LAWDIR="/usr/lawson/lawson";
$rc=system("cd $LAWDIR/print/lawhht/hishourly/3");
$msg = MIME::Lite->new(
From => 'IC500@ochsner.org',
To => 'jcarrott@ochsner.org',
Subject => 're...
I start by opening a csv file to get $field[3], which works. Then I do a select to get a value from the database.
I don't get a SQL error or a compile error. The programs appears to work just fine, but I get no data from the select.
#!/usr/bin/perl -w
#### program variables
if...
I am doing a INSERT using this code;
## save the variables to procure.RECPO2 using INSERT
$insert = "INSERT INTO procure.RECPO2 (po_number, requestor,
req_num, send_to, vend_name, buyer_name) VALUES
('" . $sPO . "', '" ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.