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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ppeel

  1. ppeel

    sprintf() not returning expected result

    I actually retrieve this number from a DB2 table, and then try to add the leading zeroes. When I changed the syntax to: $nfc_amt = sprintf("%07.0f", $nfc_amt); The Result is correct. So there is something in $nfc_amt that I'm not seeing. This is a little disconcerting to me. I was...
  2. ppeel

    sprintf() not returning expected result

    I have a variable $nfc_amt that I want to add leading zeroes to. The value of $nfc_amt is 115. my code: print "NFC_AMT before adding zeroes: $nfc_amt\n"; $nfc_amt = sprintf("%07d", $nfc_amt); print "NFC_AMT after adding zeroes: $nfc_amt\n"; my result: NFC_AMT before adding zeroes: 115...
  3. ppeel

    Auto populate ListBox Value on Data Entry Form

    It's been quite some time since I've used Access for data entry and I need some help. I have a form with a Listbox. The RowSource is a list I typed in. Just 2 rows with 2 Columns: "Checking Account";"DA";"Savings Account";"SG" . only column 2 is bound On this form there is a Control for...
  4. ppeel

    Connect to MS SQL Server Linked Server

    We have a couple DB2 databases (AIX) linked to our MS SQL Server. I want to connect to the linked DB2 databases via SQL Server. Does anyone know what the perl syntax is to do that? You can see the linked Databases under Server Objects/Linked Servers. They don't actually show up under...
  5. ppeel

    regular expression find and replace

    Thank you so much! MillerH, the last set of code ('s/\*\d*\K\w*~$/~/') works perfectly for my needs. You all rock!
  6. ppeel

    regular expression find and replace

    I am a newbie to perl and trying to find a good method to replace data at the end of input records. Input Data looks like this: xxxxxxxxxxxxxxxxxxxxxxx*TL*12345CTOM~ xxxxxxxxxxxxxxxx*TL*92349A~ xxxxxxxxxxxxxxxxxxx*TL*46975M~ xxxxxxxxxx*TL*73124W9~ I need the output to look like this...
  7. ppeel

    convert whole number into number with decimal

    I have a field that is supposed to be a number with a decimal point, ie. 0351.69, but it looks like 035169 in the file. How do I print it to look like 351.69? Thanks in advance for your help.
  8. ppeel

    Help to Elim Dups but keep required data

    That's what I thought. I have no idea why it worked this way and not the way you did it. Oh well, I'm just happy I got it to work. Thanks again dkyrtata.
  9. ppeel

    Help to Elim Dups but keep required data

    I changed it around a little bit so I could better understand it. Here's what I did: $rlen = length($record); $olen = length($output{$key}); if ($rlen > $olen){$output{$key} = $record}; And now it works perfectly. Thanks for your help. I would never have gotten this far without it.
  10. ppeel

    Help to Elim Dups but keep required data

    Hmmmm. I did check the last line of the while loop and it looks exactly like yours. Don't know. I'm trying to follow what's going on, but don't quit understand it yet. my last line: $output{$key} = $record if length($record) > length($output{key});
  11. ppeel

    Help to Elim Dups but keep required data

    Wow that was fast! Thank you! It almost worked. This is what I get for output: 1111 aaaa ffff 2222 bbbb 3333 cccc The second record should have 'eeee' in the 3rd column. So it's not quite working the way I need it. Any further suggestions?
  12. ppeel

    Help to Elim Dups but keep required data

    I'm new at Perl and am a little intimidated by some of the syntax. I'd really appreciated any help I can get. I have a file with multiple lines that have the same "key" . The output can have only one line per "key", but the information from all lines with like keys have to be in that one...
  13. ppeel

    Parsing XML and extracting Data

    Thank you tsuji! That worked!
  14. ppeel

    Parsing XML and extracting Data

    I need to extract specific data from an XML file that looks like this: <?xml version="1.0" encoding="UTF-8" ?> - <Transmission xmlns:xalan="http://xml.apache.org/xslt"> - <ImageInfo SubscriberAMI="127100570" DCN="10173100150101" DateRecieved="20100622" AccountNumber="3330972"...
  15. ppeel

    How to dial only a certain number of times

    I have a simple script that dials a number until it gets a connection. I want to limit the number of times it tries to connect. How do I do that? Current code: Dial DATA "XXXXXX" while $DIALING ; Loop while dialing. endwhile if $connectopen ; See if we're...

Part and Inventory Search

Back
Top