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!

Recent content by ljsmith91

  1. ljsmith91

    ServiceNow

    Thanks gflewis, I was using multiple mods.
  2. ljsmith91

    ServiceNow

    I am trying to use PERL to access Service Now database using the ServiceNow API provided. I could not find any threads pertaining to this. I hope someone might be able to give me some direction. All necessary Modules are installed. I pulled the code attempted from sample code from...
  3. ljsmith91

    Reading a Data Hash created via XML::Simple

    Thanks feherke.qa !! That did work...one last question, how would I print the key with it? Example code does not work but you get the isead of what I am trying to do. foreach my $book ($configs->{'BOOK:BOOK'}->{'BOOK:Trees'}->{'BOOK:Tree'}) { print "$book has $book->{content} books \n"; }...
  4. ljsmith91

    Reading a Data Hash created via XML::Simple

    Ok ...I needed to edit it down quite a bit to give a sample. Here is the XML file and another version of Data::Dumper below that which should match up with the XML file. Again, thanks for any help/ direction that you can offer. XML file: <?xml version="1.0" ?> - <BOOK:BOOKConfigurationFiles...
  5. ljsmith91

    Reading a Data Hash created via XML::Simple

    I have an XML file that is thousands of lines long and I need to parse it out. I am attempting to use XML::Simple to read it in and put it into a Hash Array so that I can extract what I need. However, when I go to process with foreach I cant nail down the referenced data elements from the...
  6. ljsmith91

    EPOCH UTC datetime field- need converted to standard date with local timezone

    I have an epoch date time stored in a table that is UTC or GMT time. I need to convert the epoch date to standard date and adjust time to local time zone(CST). CST is 6 hours behind UTC or GMT. If I use DATEADD I can convert epoch UTC to standard datetime in UTC/GMT but how do I also adjust for...
  7. ljsmith91

    Compare 2 dates and get number of business days between the 2 dates

    I need some expertise. I have 2 dates pulled out of a database record. They are in scalars $date_start and $date_end. I convert the dates to epoch and get the number of days between the 2 dates and place this value in another scalar called $day_diff_in_days. So, $date_fiff_in_days can be equal...
  8. ljsmith91

    Need to query a field and pull out specific information only

    Excellent...thanks so much gmmastros !! That works great !!
  9. ljsmith91

    Need to query a field and pull out specific information only

    I need some help, not sure if this is possible. Is there a way to query a SQL field that has variable length information and pull off only specific needed information. Example: Field Filename could have any of the following values: c:\windows\install\bin\thisfile.dat...
  10. ljsmith91

    Query a 4 byte RAW Data field and convert bit settings to a string val

    Hi Dagon, Thanks so much for the reply. I do not understand the 4 bytes either. I am going to put your code in play and see if it translates it as is expected. Thanks so much for the help. I have never come across this before so it's good to learn through this forum from folks like yourself who...
  11. ljsmith91

    Query a 4 byte RAW Data field and convert bit settings to a string val

    Hi all, I have no idea how to go about this and any direction would be a great help. I need to query a 4 byte raw data field in a table and convert the bits to string values. The db layout manual has a mapping for this field: From the DB Manual: field_name = day_of_week (RAW 4-bytes)...
  12. ljsmith91

    How do I Query just latest x records of each item in a table?

    Hi Dagon, Yes...I was using dense_rank. However, I neglected to state in my sample that my date field was actually a date and unique time. I was specifying to_char(My_DATE, 'yyyy-mm-dd') in SELECT Statement but not in the dense_rank ORDER BY statement(I was just stating My_Date). When I changed...
  13. ljsmith91

    How do I Query just latest x records of each item in a table?

    Thanks Dagon, It doesn't seem to be working. WHen I just execute the inner query with the dense rank, I see the list of unique items/schedules and in my case it ranks a specific items/schedule with 150+ records (ranked1-150) some of the same date and some of different dates. The first 6 records...
  14. ljsmith91

    How do I Query just latest x records of each item in a table?

    I just realized based on the query output that there are some items that have the same date. What I need is DISTINCT date and a MAX of the field Status which would tell me the highest exit code for that date. I would want to create 10 records for each item with but each of the 5 records must...
  15. ljsmith91

    How do I Query just latest x records of each item in a table?

    Mufasa, Yes...thanks...it is working. It does the trick for me. I appreciate the useful information.

Part and Inventory Search

Back
Top