Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: jcarrott
  • Content: Threads
  • Order by date
  1. jcarrott

    Using a value if it is found in an array

    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...
  2. jcarrott

    Erroring when opening second db link

    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...
  3. jcarrott

    Trying to use DBI::SQLite

    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...
  4. jcarrott

    convert a string to number and divide

    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...
  5. jcarrott

    DBI update function

    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...
  6. jcarrott

    Trying to create ClickBank paymet link

    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...
  7. jcarrott

    Trying to format a string to a fixed length

    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...
  8. jcarrott

    Trying to log the user name of the person making a change.

    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...
  9. jcarrott

    trying to format a field that has 4 decimal places

    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...
  10. jcarrott

    Trying to automate the date range

    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...
  11. jcarrott

    format a field to a fixed width

    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...
  12. jcarrott

    Problem adding IF statement while doing FTP process

    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...
  13. jcarrott

    trying to do a string find and replace

    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...
  14. jcarrott

    Checking to see if data is already loaded

    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 . "'")...
  15. jcarrott

    dbi delete does not seem to work

    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...
  16. jcarrott

    trigger not firing

    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 (...
  17. jcarrott

    MS Excel Lookup formula

    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...
  18. jcarrott

    MIME::LITE not sending email

    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...
  19. jcarrott

    using a dbi select and returning nothing

    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...
  20. jcarrott

    How do I skip a fatal error

    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 . "', '" ...

Part and Inventory Search

Back
Top