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...
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...
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...
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...
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...
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)...
I am not sure if this is possible but wanted to ask the sql experts. I need to pull just the X latest records for each item from a database table. A small sample of the table is below. So, if I just want to pull the 2 most recently dated items/schedules in a query, I am not sure how I would...
I am not sure if this is possible but wanted to ask the sql experts. I need to pull just the X latest records for each item from a database table. A small sample of the table is below. So, if I just want to pull the 2 most recently dated items/schedules in a query, I am not sure how I would...
I have a database with 3 different tables. Each has a field(model) that is used for the exact same purpose. In simple terms, I want to eliminate the field in 2 of the tables so that the field is contained in only 1 table instead of 3. In order to do this, I want to know how many distinct records...
I have several production tables that I would like to keep in synch(at least bi-weekly) with our dev tables. I was wondering if this could be automated but I am not sure exactly how to do so. By dev tables, its really just development for reporting. SQL query dev work is done on these tables...
Hope someone can help. I have a sql db table that contains daily records, there is 1 record each day for each storage device. I need to query (pull) only the last day of each month for the last 24 months. How can I query the table to extract only the last day of each month for the last 24 months...
I am trying to attach specific hours of the day to my WHERE clause which checks a date and time stamp of of datetime field and also uses sysdate to get the correct date. I cannot seem to get the syntax right as I am not a truw sql programmer. Can someone show me how I could code this statement...
Sorry, I hardly ever use SQL but I have a query I need to modify and create a new field that has a counter for every row output from the query. How do you establish a counter that increments for each row output? This is probably SQL 101 but like I say, just a rookie. Thanks in advance.
Hi,
I need some help with a sql query. I have a table that looks like this:
client gbytes backupdate files
abcd 10 2009-01-31 152
abcd 45 2009-02-19 450
abcd 77 2009-02-27 352
abcd 77 2009-03-03 351
bcde 400 2009-01-24...
I am a novice and need some help with this sql query. I have a sql table that contains records of tape media written to, the date written to and whether the media is onsite/offsite and the date it was discovered offsite. It has other fields but these 4 are what is of importance. Sample info in...
Using Korn scripting, is there any way of rounding up a decimal number to the next highest whole non- decimal number ? Examples:
if $num = 2.2 then I want $num to = 3
if $num = 17.28 then I want $num to = 18
if $num = 1002.758 then I want $num to = 1003
Any help or direction would be great...
I have a scalar and there is an unwanted blank charachter sitting at the end of it. It was pulled from an input file and as I read in the file I have to grab specific data and place in a scalar to process but each time it's pulled it has this unwanted charachter. Torjanwarblade provided this...
I have a simple SQL table that contains only a few fields. One field is "client", another is "my_date". There are a few other fields I need to pull too. But since there are so many dates for each client, I only want to output the most recent date for each client. I have tried both TOP and...
I am a novice sql reporter. I have a field called tape_media in a sql query that I am GROUPing up and counting how many unique tapes a job is writing as a summary for each day. I would like to also list each of these DISTINCT media in a new field that is grouped along with my other GROUP fields...
I have no date modules as this routine will run on too many systems to install on so I am limited.
I am trying to convert two days(examples 03/07/2008 and 07/18/2008) to epoch date so I can subtract them and get the difference in seconds. The time is not a part of this.
O know how to convert...
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.