Converting dayperiods?  Is it possible?

Hey everyone...
I have a question relating to creating a SQL query. I am not pro by any means, but rather a beginner-intermediate, so bear with me...
I am creating a query to find all the actions that took place on a particular account yesterday that was over a certain amount. The only problem is, in my companies database, the date is listed as a dayperiod and not an actual date. Is there any function or any way to translate dayperiods into standard formated date (08/09/2007) or something similar? If that is not possible, is there any way to do something like...
where cd.DAYPERIOD > SYSDATE-2
Any ideas?
Thanks,
Scott

And,
you could create a function that allows you to convert to a date without typing it each time.
FUNCTION get_real_date(p$_dayperiod IN NUMBER)
  RETURN DATE
IS
BEGIN
  RETURN TO_DATE(TO_NUMBER(TO_CHAR(TO_DATE('01011970', 'MMDDYYYY'), 'J')) + p$_dayperiod, 'J');
END;
WITH cc AS (
SELECT 1 id, 13734 dayperiod FROM DUAL UNION ALL
SELECT 2, 13733 FROM DUAL UNION ALL
SELECT 3, 13732 FROM DUAL)
--end test data
SELECT dayperiod
      ,get_real_date(dayperiod)
  FROM cc; 
DAYPERIOD              GET_REAL_DATE(DAYPERIOD) 
13734                  09-AUG-07                
13733                  08-AUG-07                
13732                  07-AUG-07                
3 rows selected
WITH cc AS (
SELECT 1 id, 13734 dayperiod FROM DUAL UNION ALL
SELECT 2, 13733 FROM DUAL UNION ALL
SELECT 3, 13732 FROM DUAL)
--end test data
SELECT id
      ,dayperiod
      ,get_real_date(dayperiod)
  FROM cc
WHERE get_real_date(cc.dayperiod) = TRUNC(SYSDATE, 'DD') - 1; 
ID                     DAYPERIOD              GET_REAL_DATE(DAYPERIOD) 
2                      13733                  08-AUG-07                
1 rows selected

Similar Messages

  • Adding Itunes EQ to already converted MP3s, Is this possible?

    I have a ton of MP3s I downloaded from the web. I want to add one of the preset EQ settings to them. Is there a way to do this even though they are already converted to MP3 format? If not, is there a way to convert them to wav again and then back to MP3 with the EQ setting?
    Thanks a million!!!

    All you need to do is rightclick the song in iTunes, select Get info, hit the "Options Tab and there you can set a EQ preset for that song only. If you have an iPod and add the song to iPod it will now play in that EQ setting on your pod,

  • Converting of CDs not possible, You dont have the right to convert...

    I just went from iTunes Windows to iTunes Mac. There weren´t any problems to restore the library and to bring my iPod to the new environment. But now, when I want to import CDs iTunes does not import and tells me there were conflicts with converting the CDs because I would not have the rights to do that.
    Is there any help for me

    It likely said "Attempting to copy to the disk 'your hard drive name' failed. You do not have enough access privileges for this operation."
    Read up on this for solutions:
    http://docs.info.apple.com/article.html?artnum=300198

  • Convert LaserJet 5200 220v to 110v power

    Is it possible to purchase the proper parts to convert a LaserJet 5200 from 220v to 110v?
    I know about power converters, but just thought it would be better to convert the thing if possible. thanks.

    my recommendation is to use an external converter
    Although I am an HP employee, I am speaking for myself and not for HP.

  • Using my software to convert videos for another user - how do I sync it ?

    I have been using a software to convert dvd for ITouch with great effect. now I want do do same for a friend - but am worried that when I syn i will loose all that's currently on her iTouch. How can I do this?

    Before someone points out that we cannot discuss of even act like converting a DVD is possible because it is allegedly illegal, you are not asking that. You, by magic we assume, can do this. You are asking whether you will lose what is on her iPod.
    I am not sure you can sync her iPod from your system but if you did you'd want to set it to only sync what you checked and then only check that one movie.
    I wonder... is there a reason yo cannot just move the converted file from your computer to hers and let her import it?
    -fred

  • Using the "Convert higher bit rate songs to 128 kbps AAC" feature...

    I recently discovered the "Convert higher bit rate songs to 128 kbps AAC" feature and used it to copy my entire 70 GB music library to my 64GB iPad. The music library now occupies only 45 GB. Awesome!!!
    Unfortunately, the whole process took well over 24++ hours on my quad core Windows 7 computer (takes about 6 seconds per track). Questions:
    1. Is it possible to speed up the process? Even though I am using iTunes 64-bit version, it seems that at no point is more than a single core being used at 33%. Seems to me like overall 8% of the CPU (33% / 4) capacity is being used for the conversion and 92% is being left idle. Is this just bad programming or is there anything I can do to speed up the process? Others see similar problems?
    2. Now I have already started dreading the day, I need to restore my iPad (e.g., when OS version 4 becomes available). I would hate to have to do this process all over again. Should I need to restore my iPad, is there anyway I can force iTunes to back up the 128-bit AAC versions on my computer and restore it up from there?
    Any insights into both these questions will be deeply appreciated.
    Cheers,

    ed2345 wrote:
    malus_domestica wrote:
    Thanks for the response.
    So, I am wondering why iTunes uses only 8% of the processor power in converting the songs.
    Possible reasons not to grab more of the CPU power (1) maybe the process is I/O bound due to all the writing, and is not processor limited? (2) since conversion is almost always a background program, and the user will typically have other things going on, maybe it intentionally limits CPU use?
    I ran a few quick experiments (out of curiosity) and think the answer is #2. No apparent technical reason but potentially a limitation introduced by Apple's engineers to maintain a good user experience (for some people at least). I fired up 4 instances of dbpoweramp and ran multiple conversions and found that the process goes faster than what iTunes can do by an order of magnitude. With luck, someday Apple will have an option for users to select how much of processor bandwidth to be allocated for the conversion.

  • Quality of VHS/8MM imported through DAC 200 anolog converter

    I purchssed a data vision DAC-200 to convert my VHS and 8MM tapes and import into iMovie. However, when I import there are breaks in the import and the quality of the import is poor, even though the quality on the TV (VHS) and camcorder is good.
      Mac OS X (10.4.8)  

    To tell you the truth I've read complaints/questions about configuring this and several other datavideo units but none about quality.
    Any other suggustions
    No, other than double checking other selectable features on the converter.
    Is it possible that the DAC - 200 is defective?
    Sure, that's a possibility. Or maybe the best quality this unit can produce doesn't meet your expectations.
    If either is true I would suggest purchasing an inexpensive Mini DV camcoder w/passthru feature (HD Camcorders will drop in price soon and become the defato, no since in spending a lot of money), then you could record, convert, play etc. (more features than purchasing another converter)
    Note:
    If you setup your converter on another computer using the same VHS player/8mm camcorder and input source, you'd have a comparison to base your next decision on.

  • ITunes converted wma files

    Hi all,
    I have all my CD's ripped to an external hard drive in .wma form. I had to reinstall Windows recently due to an error, and have now re-downloaded iTunes, but have to re-convert all my music which takes a long time.
    Once I convert all these .wma files to .mp3 this time, are they kept somewhere? I would like to replace the wma's with the converted mp3's if possible. Thanks!

    can go to the iTunes folder, and copy and paste the converted MP3's to replace the WMA's?
    Why do you need two copies of the files?
    One in the iTunes music folder and one on the external?
    If you want them backed up, simply copy the entire iTunes folder to the external drive.
    You can do it thru Windows Exploder or use any backup program to do it automatically.

  • How to convert Oracle charset database

    I have a Oracle database which set charset "WE8ISO8859P1". how can I convert to "SJIS" charset that dont need create new database

    You can't.
    You can successfully convert an Oracle database's charset without database recreation if and only if 1) the original charset is a strict subset of the final charset (the letters in the set) and 2) the codepoints (the numbers that encode the letters) in the original charset don't change in the final charset and 3) all of the data in the database actually is encoded in the original charset (or at least is correctly encoded in the final charset). This is because this type of conversion is accomplished by simply slapping a new charest lable on the database as a whole; none of the binary values in the data get looked at, much less touched. If you "convert" a database and all three are not true, then some or all of your string data becomes complete and utter garbage.
    For WE8ISO8859P1 to SJIS, both 1) and 2) are false.
    3) becomes an issue because of what Oracle calls an optimization and I call a stupidity; when a database recieves string data from a client that asserts it's using the same charset, nothing checks that the data passed is actually in that charset; thus is it's trivially easy to get 8-bit data in a 7-bit US7ASCII database; it will read and write correctly until the day you try to convert to a superset of US7ASCII, such as UTF8. Then WHAM! Data corruption.
    Oracle customers with support contracts can get a lot of documentation about character set conversions from the Metalink support site. Oracle also strongly recommends that customers file a support request for conversions (although someone who reads all the docs and understands character encoding and the NLS settings can muddle through on their own). Oracle also has lot of free documentation about globalization and character sets on the OTN site, which just requires a registration, but I'm not sure the nitty gritty details are there.
    For non-subset conversions, the way to do it is to export the data, create a new database and import the data. Conversion to the new encoding will occur on import.
    There is a utility, CSSCAN, that can be used to prepare for a conversion. It will scan the database for strings that will have difficulty converting.
    Besides the possible issue of data that is outside of the original charset, it will also check for data that will be truncated on conversion. By default, the size specification of a VARCHAR2 in Oracle is the number of bytes; when a character is converted, it may expand the number of bytes that it requires, for example when switching form a 7 or 8 bit encoding to a 16 bit encoding. If enough characters in a value are expanded, the data exceeds the size of the column and is truncated or dropped (I forget). Recent Oracle versions lets you change from having the DB count size in bytes to counting size in characters; I don't yet know if this plays nice with imports with character set conversion (I'll know in a few months).

  • Convert pdf to .wps

    Here's some fun....I want to convert an online application form in pdf to a 'fillable' form and I only have .wps on home computer.  ??

    Adobe Reader cannot convert files.  And I think even Acrobat cannot convert WPS files.
    Possibly Microsoft Word 2007 / 2010 / 2013 can.

  • How do I convert already imported and edited RAW (NEF) files + it's Sidecar file, to DNG?

    Using Lightroom 4 now on a Mac. I have an extensive number of RAW (NEF) + Sidecar combos, that I wish to convert in groups, if possible, to DNG format, so the data of the sidecards is retained, and the DNG created does not need to be reedited from its origional camera state. What is the best way of doing this with a large number of files?

    Does Library>Convert Photo to DNG not do this?
    Edit: just checked. It does. While the DNG replaces the file in Lightroom, the Raw and the XMP are still there on the disk.
    Edited to add more info

  • Fiber to Ethernet converter setup.

    I am testing a fiber connection over media converter.
    The cenario is as follows.
    Setup sfp interface IP on cisco router. Connect Fiber to Media Converter fiber interface and connect Ethernet interface to Firewall Ethernet Int and setup ip.
    Cisco router gig0/0 SFP ==========  Fiber to Ethernet Converter --------------- Firewall
    Is this possible? if so how would i get this to work?
    Thanks for the help.

    Thanks for the reply.
    I think that you might be right. I guess i need a converter as a stand-alone application.
    All a really want to do is configure Cisco Router with an GLC-T SFP and  connected over fiber to a location and from that location use a converter to convert fiber to ethernet and configure their firewall. I beleive the converter...like you said it will have to be a stand-alone device. Also it would have to have auto-negotiation capabilities.
    Any suggestions on a type of fiber to ethernet stand-alone converter?
    Thanks

  • MacOS 7 cannot find Unicode Converter

    Trying to launch a Classic application on MacOS 7.0, we get the message "Cannot start application. Cannot find Unicode Converter." Is it possible to obtain whatever it is the System is actually looking for? Or can the System be faked out on this issue? It is a graphics application; I don't really care about text issues.

    Unicode was introduced to the Mac OS in a version of Mac OS 8 if my faulty memory recalls correctly. It will be a system extension more than likely but also more than likely NOT called "Unicode Converter".
    If you can figure out what library file to use, you can put a copy into the extensions folder on your System 7 machine and see what happens when you start your application.
    But I suspect that your system will simply crash if you try this. It nay not even boot.
    Gary

  • Convert Window Oracle 10g to Linux Oracle 11g

    HI Experts
    My current version is Oracle 10g on Window and i want to convert on Oracle 11g on Linux.
    What will be the best way to convert it ? can possible to direct convert
    or i need to be database migration from window Oracle 10g to Linux Oracle 10g and then covert from Linux Oracle 10g to Linux Oracle 11g.
    If the direct conversion is possible then please let me know the way or if u have document then please share it.
    I searched lot but i didn't get anything.....
    Thanks in advance

    What is the expected downtime duration ?
    What is the database size ?
    For a "small" database with no downtime constraint you could use Data Pump to move data.
    For a "large" database with minimum downtime you could use Oracle Streams (with Enterprise Edition) or Golden Gate (separate product: needs new licensing).
    You can find detailed migration/upgrade recommendations and scenarios on OTN database upgrade page:
    http://www.oracle.com/technetwork/products/upgrade/index.html
    Edited by: P. Forstmann on 22 mars 2013 13:03

  • Can I use a thunderbolt display with an hdmi converter to a PC?

    I bought a Thunderbolt display, and have seen a ThunderBolt/MiniDisplay Port to hdmi converter.
    Is it possible to use a ThunderBolt display as PC display if I use this converter?
    thanks!

    Probably not.  Unlikely.  The ThunderBolt/MiniDisplay Port-to-hdmi converters are intended for connecting the thunderbolt port on an Mac to an HDMI input on a display or TV.  You can't assume these converters work backwards and without knowing exactly what converter you are talking about, and what video out your pc has ... it's impossible to say.
    I would add that one should think long & hard about risking a $1000 Apple thunderbolt display by connecting it to something it wasn't designed for.

Maybe you are looking for

  • How do I install logic 9 on an older macbook pro ?

    I downloaded logic 9 on my new macbook pro through to App Store. I want to also run it on my older macbook (Early 2008) currently using mac os x 10.5.8. How do I upgrade the Os X so it works and how do I install logic on the old one ? - I can't go fr

  • Modifying Dynamic selection in standard logical database

    Hello guys, I have a requirement to add a field to a dymamic selection of standard programs. The standard programs used the logical database KDF. I have created a custom selection view and included the required field which is from table BKPF. But thi

  • Report for finding G/L account per purchasing document / reservation

    Is there a report to get a list of G/L account for Purchasing documents / Reservations? If not, can a new scope of list for any standard report such as ME2N / ME2B be created to include the G/L account list?

  • Zen Xtra 40 GB Questi

    Recently I purchased a new charger for my Zen Xtra from the site which took about month or so to arri've. After it arri'ved I added all my albums to the Zen Xtra 40GB player and carried it with me everywhere, then all of a sudden it got stuck at EAX

  • Preferences Keep being forgotten - Corrupted?

    So every now and then the Finder will lose my View preferences and things will pop up in icon mode instead of list mode(this has happened on a folder that I use regularly and never change the view mode on - so no, it isn't that I opened a new window