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 SkipVought 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: *

  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

    This is closed, the problem was that SQL was not setup correctly.
  4. jcarrott

    Trying to use DBI::SQLite

    My database is DEV and my server is spwdclwsntdb1
  5. jcarrott

    Trying to use DBI::SQLite

    I tried dev.employee and got the same result. I do have 2 $$ characters in $pass and I have asked for a password with no special characters.
  6. jcarrott

    Trying to use DBI::SQLite

    I forgot to mention that this is a Windows/SQL machine and in the past I was working on a Unix/Oracle machine.
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. jcarrott

    Trying to automate the date range

    Will this give me the first day of each month? For example today is 10/24/2011. I need the first date to be 9/1/2011 and the second to be 10/1/2011. This way I am testing for all values greater than or equal to 9/1/2011 and less than 10/1/2011. This way I don't have to worry about what the last...
  15. jcarrott

    Trying to automate the date range

    I guess I communicated poorly, I am trying to get the current date and compute the first day of the preivous month and the first day of this month. I was running into issues where the current month is January
  16. 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...
  17. jcarrott

    format a field to a fixed width

    that works - thank you
  18. 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...
  19. jcarrott

    Problem adding IF statement while doing FTP process

    Here is the code that I used. $filefound = 0; 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 => 0) or die "No connection"...
  20. 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...

Part and Inventory Search

Back
Top