Capturing results from a date range where dates are concatenated with text

my issue_code column has results = OK and the date. An example would be OK20071001 where the last 8 digits is in the YYYYMMDD format.
How can i calculate the # of PO#s that had OK as their issues during a given month.
The sql below shows what i had but i get an error:
SELECT count(unique(SAP_PO_NUMBER)
FROM VENDOR_PURCHASE_ORDER
WHERE SUBSTR(ISSUE_CODE,3,8) BETWEEN
TO_CHAR('20071001', 'YYYYMMDD') AND TO_CHAR('20071101', 'YYYYMMDD')
AND ISSUE_CODE LIKE 'OK%'

I'm usually a fan of TO_DATE transformation myself. However in this case I don't feel it is neccessary. The column is already in VARCHAR2 and has a dateformat in an ordered fashion.
why not simply do this:
SELECT count(distinct SAP_PO_NUMBER)
FROM VENDOR_PURCHASE_ORDER
WHERE ISSUE_CODE LIKE 'OK200710%';This statement won't raise an error when skrewed date values are in this column. But I'm not sure if this realy is possible and which version is wanted.
'OK20071043' => Should this result in an error or not?
Message was edited by:
Sven Weller

Similar Messages

  • HT201412 what do you do when your phone numbers no longer have the contact persons name just a number. Also names are missing from the address  book where contacts are.

    what do you do when your phone numbers no longer have the contact persons name just a number. Also names are missing from the address  book where contacts are.

    I, too, love everything about my phone. The other day I tried to crash my Z10 by running multiple apps and having videos running in the background. Do you think my Z10 showed any signs of slowing down? Nothing doing! It ran as smooth as silk. I'm very impressed.
    Cheers.
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • Is the Time Capsule wi-fi router compatible with the Nest thermostat? I've read where there are issues with the Nest and Airport Extreme (AE)? Is AE used in the Time Capsule?

    I've read where there are issues with the Nest and Airport Extreme (AE)? Is AE used in the Time Capsule?
    If so, i already have a wi-fi router, so can the Time Capsule simply be used for wireless backup instead of as a router if there is conflict?

    A TC is fundamentally a AE with a sata chip included to drive the hard disk. Some slightly different bios to include disk functions, although most of those are also on the AE. So as a router it is 99.999% identical.
    And yes, if you have another router you can easily bridge the TC and use wireless for backups and internet connection. Once you no longer route through the TC the issues with most NAT problems including port forwarding should disappear.. mostly this is due to all apple routers using NAT-PMP instead of upnp which is the near universal standard for opening ports.. without upnp apple keep their routers more exclusive.

  • Help needed please -Master data loading- error with text loading.

    Hi,
    Iam S.Sushma. Iam getting error while loading master data from flat file- attributes and texts.
    I have loaded attribute data successfully. But when iam monitoring the text data then iam getting following error.
    ""SET THE LANGUAGE FIELD IN THE SOURCE SYSTEM-LONG TEXT.""
    ""RECORD1: SRPID_1:DATA RECORD 1(EN S):DUPLICATE DATA RECORD.
    "ERROR 4 IN UPDATE"
    I took 2flat files for attributes and texts.
    SRPID is key field.(sales representative id)
    attributes:- SRPID, NAME1, AGE1, ADD1,PHONE1.
    text:-  SRPID,LANG,SHTXT,MDTXT,LGTXT.
    Iam just a begginer so need your guidence. Thank you in advance.
    Message was edited by: sushma sandepogu
    Message was edited by: sushma sandepogu

    Hi Eugene,
    Thank you for your guidence. I have changed the order in flat file and got the results successfully. But when iam viewing the Master data text the S10 in coming in 2nd position  in maintain master data-list screen i mean :-
    SRPID LANG NAME AGE ADD PHONE SHTXT MDTXT LGTXT
    S1         EN  ABC   34  GDS 1234  AS    ASD   ASDDF
    S10
    S2
    S3
    S9.
    Iam not understading why. Hope yu can help me. I have assigned full points to you for your previous solution.
    Thank you in advance.
    S.Sushma.

  • Date Format Mask with text only...

    Hi!
    I have a problem with my date text item: the format mask is set to YYYY-MM-DD HH24:MI:SS and it work perfectly if the user enter only numeric character, it will validate the date correctly. But if the user enter a value only alpha (something like 'uuuuyyyy') instead of validate with the mask format it will fire an error trigger ORA-06502.
    I want to know if it's possible to check if the user has enter only alpha to bypass this problem.
    Also, how can a check that a date field is null. I Try with : IF :BLOCK_NAME.DATE_ITEM IS NULL THEN ...
    AND ALSO with IF TO_CHAR(:BLOCK_NAME.DATE_ITEM) IS NULL THEN... and nothings seems to work.
    Thanx in advance.

    AFAIK, the only way to do this is to have two items. One is a hidden database item, type DATETIME, to hold the date value.
    The other is a non-database character item, visible to the user. You populate it at POST-QUERY from the database field, and use an ON-VALIDATE-ITEM to copy any value entered/changed by the user over to the hidden field. If you're smart, you'll write a library procedure to do the on-validate stuff, passing it the names of the two items.
    In that procedure, you can attempt to convert the entered text into a valid date using whatever date format(s) you like, only raising an error if you can't do it at all.

  • Can we give UNIQUE ACCESS FOR THE SPECIFIC FILE IN THE LIBRARY in SP2013? How can we remove users from SHARED WITH link where files are shared with users?

    Hi,
    Any help on this?
    Thanks
    srabon

    Hi srabon,
    For giving unique access for a specific file in a library, you can go to the library, and select the file , and click FILES->Shared With->ADVANCED, under PERMISSION ribbon, click ‘Stop Inheriting Permissions’, then the file will have unique permissions.
    For removing the shared users for a file, firstly, like the above steps, select the file , and click FILES->Shared With->ADVANCED , make sure the file has unique access, then select the users that you want to remove, and click Remove User Persmissions
    under PERMISSIONS ribbon.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • When trying to open an email in a list of sent emails resulting from a search I keep getting this box with words "1 item attached to my pointer - what is it and how can I get rid of it

    running latest version of firefox and email server address is @msn.com

    running latest version of firefox and email server address is @msn.com

  • My iPhone both sends and receives messages from 2 different phones. They are registered with the same iTunes account. What can I do to stop this?

    My partner and I both have iPhone 5s and an iPad. We registered all three products with the same iTunes account as we download music and movies together. I have noticed when my partner sends me a message it also appears on my phone that I have sent it AND recieved it. The same goes for when I text him. I send the message to his phone and my phone also recieves it. Facetime does the same thing. Its very strange. Does any one know what I can do to stop this from happening?

    To stop this, don't use the same Apple ID on both phones for iMessage and FaceTime.  (You can continue to use the same ID for iTunes; it doesn't need to be the same as the ID used for iMessage or FaceTime.)
    On one of the phones, go to Settings>Messages>Send & Receive, tap the ID, sign out, then sign back in with a different ID.  Then do the same thing in Settings>FaceTime.

  • If I delete photos on my Iphone or Ipad, are they also deleted from Icloud and other devices which are synced with Icloud?

    I have a number of photos on my Ipad and/or Iphone, and I have synced them with Icloud (my IMac is also synced with Icloud). I know that I can choose to synch directly with my IMac instead of with Icloud, but I would like to know what happens to the photos if I delete them from my Ipad/Iphone? I want to delete photos and movies to make more room on the devices.
    I have not selected automatic syncing with Icloud for my photos.
    I assume that the photos remain in Icloud until I go to Icloud to delete, but does anyone know how that is supposed to work?
    Thanks

    Remember that you should not store photos on iCloud. It's time and capacity limited. It holds up to 1,000 photos for no more than 30 days. So, import  no. 1001 and the first one is dumped. Leave them untouched and they will be deleted from iCloud after 30 days.
    You can't delete individual photos from iCloud (only reset the whole thing) so trashing from a device will not trash from iCloud.

  • How can I print a completed form, where there are boxes with scrolling capabilities?

    There are text boxes within the form that allow people to input more information in the space provided, so the boxes allow for scrolling.  I am wanting to print a completed form, all of it, but the text boxes only print what is visible. 

    Hello,
    Unfortunately, it is not possible to print the whole form with the complete options. Only selected text can be printed in a form, as printing the document makes it flat. 
    Regards,
    Nakul

  • Capturing Audio from DAT

    Hello,
    I'm trying to capture audio from a DAT deck (Tascam DA-20) into FCP HD by routing it through my JVC BR-DV600U DV deck (RCA output from DAT, RCA input to DV deck, Firewire into FCP).
    The DV deck's input is set to line-in, and the audio is being routed through (audio meters on DV deck mimic those on DAT deck, and I can hear the audio through the headphones jacked into my DV deck).
    However, when I try to capture the audio on FCP, I am unsuccessful, prompting the following window from FCP: "Error: Final Cut Pro HD was unable to read the movie file just captured."
    Now, I use the same set up I described above to capture footage from my Beta deck into FCP with no problems (route Beta signal through DV deck and firewire it into FCP). This leads me to believe that perhaps the glitch lies within my Capture Presets.
    At first, I tried to capture the signal as an Audio-Only DV NTSC 48 Khz/Non-controllable device. After that failed, I tried to create my own capture preset, but am not sure it will make a difference, as the only input choices I am given are DV Audio, Built-In Audio, and None.
    Any suggestions?
    Thanks.

    Why not capture the audio content outside of FCP, check the sample rate for 48Khz/16-bit, convert if necessary, save as an AIFF file, and then import that resulting sound file into FCP?
    Any good audio app, including STP will do captures.
    You are probably going to need to do some cleanup on the audio anyway before you use it, so why not just use an audio app to do it beforehand?
    Besides, if you have an audio device (PCI card or Firewire device) in your Mac, you can use the S/PDIF port for your connection to the DAT and do a digital transfer when you import.
    As I understand the way you are doing it now, you are taking digital content from the DAT, converting it to analog for the connection into your deck, and then re-converting it into digital when you capture it back into FCP.
    One big advantage of digital audio (and video) is to avoid generation loss and added noise during transfer if you go D-to-D.
    If you don't have an audio card or Firewire A/D audio I/O device with S/PDIF ports in your Mac, then see if you can find a friend who has one and can do the transfer for you. Then he can give you the file on a CD-ROM.
    That's what I'd do.

  • Script to insert date  from a specified range of periods

    This is my situation. There is a thing call prorate convention in EBS Oracle Fixed Assets.
    I have to do a prorate rule on a daily basis.
    The first date starts at year 1942. I can do it manually but to continually press TAB on my keyboard it will take me more than 4 hrs to populate all the data up to 2015.
    Therefore I need a script to enter the
    START_DATE
    END_DATE
    PRORATE_DATE
    Ex
    START_DATE   01-JAN-1949   END_DATE 01-JAN-1949  PRORATE_DATE 01-JAN-1949
    START_DATE   02-JAN-1949   END_DATE 02-JAN-1949  PRORATE_DATE 02-JAN-1949
    START_DATE   03-JAN-1949   END_DATE 03-JAN-1949  PRORATE_DATE 03-JAN-1949
    START_DATE   31-DEC-2015   END_DATE 31-DEC-2015  PRORATE_DATE 31-DEC-2015

    Hi,
    Here's one way
    INSERT INTO  table_x (start_date, end_date, prorate_date)
    WITH    params    AS
        SELECT  DATE '1942-01-01'  AS first_date  -- or 1949, or whatever
        ,       DATE '2015-12-31'  AS last_date
        FROM    dual
    ,    all_dts   AS
        SELECT  first_date + LEVEL - 1  AS dt
        FROM    params
        CONNECT BY  LEVEL <= 1 + last_date - first_date
    SELECT   dt, dt, dt
    FROM     all_dts
    I hope this answers your question.
    If not, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.  Post everything right on this site, without attachments.
    If you're asking about a DML statement, such as INSERT, the INSERT statements you post (if any) will the contents of the table(s) before the DML, and the results will be state of the changed table(s) when everything is finished.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ:Re: 2. How do I ask a question on the forums?

  • Sort Spotlight results by creation date?

    Hi All--
    At work, I've recently switched from an old old version of MS Outlook to Entourage 2004, which seems much better. I'd like to archive my old mail, and use Spotlight to search it.
    This works very well, except that with e-mail, the "date received" is the key date -- not the "last viewed" date that Spotlight likes to sort on. When I click on a found e-mail, sure enough the "date received" is displayed, but I can't sort on it. It's pretty frustruating when you're looking for a particular mail, and Spotlight keeps resorting them every time you open a message to see if it's the right one.
    Is there a way to get the Spotlight window to sort by creation date? I'm open to Terminal hacks, etc -- any ideas?

    > Is there a way to get the Spotlight window to sort by
    creation date? I'm open to Terminal hacks, etc -- any
    ideas?
    I think I understand the question. I find the results from the Find command (command-F) are more useful when viewed in list mode. I didn't realize at first that you could do this. Try this:
    1) Do command-F - search for whatever you want, doesn't matter
    2) Change the View in the command area to List. (It's got three options: icons, list, or groups. Spotlight seems to default to displaying by groups.)
    3) Pull down the Finder "View" Menu and select Show View Options.
    4) Date Created is probably unchecked. Check it.
    5) Now you should have a Date Created column in your search area. You can click on the Date Created header to sort by Date Created.
    6) ... but it will come up in Groups mode next time you search. One solution is to Save your search into a smart folder (SOMETHING.savedSearch). Customize your search display how you like it. Once it's saved you can put the smart folder in your Sidebar or your Dock so it's always available.
    Hope that helps - works for me.
    Powerbook G4 12"   Mac OS X (10.4.8)   1.5 GHz, 1.25Gb ram

  • Problem accessing results from DataService fill method

    I've set up an application that gets data from a data service
    configured with a java-dao adapter. If I define a DataGrid
    with the
    array populated by the fill method I see the data in the
    grid. Cool.
    So I know I've configured and coded everything correctly.
    However, if I try to access the data with the following code,
    it
    appears my array is empty!
    ray = new ArrayCollection();
    ds = new DataService("assets");
    ds.fill(ray);
    var asset:Asset = ray[0];
    This gives me an index '0' out of bounds error. I've also
    tried
    ray.getItemAt(0) with the same results.
    How do I access and manipulate the results of a fill method
    via
    ActionScript? I'm currently using Beta3.

    Note that it takes time to actually make the dataservice call
    and retrieve the results. Your data won't be available right away.
    After calling fill(), you have to wait for the "result" event of
    the DataService object.

  • Using Labviews 6i Limited Vision capability to capture frames from DT3132 Board.

    I'm wondering if anyone has used Labview 6i Limited IMAQ VI's to
    capture images from a Data Translations DT3132 Board? Is it possible
    to quickly create an Application without purchasing IMAQ Vision ADD-IN
    Module for Labview?
    Thanks,
    Regis

    Regis,
    You have confused capturing and processing images.
    The IMAQ drivers are used for capturing images using NI boards. If you are going to capture images using a different manufacturer's board, you need to find out if they have drivers for LabVIEW.
    The IMAQ add-on toolkit is for processing images. With the built in tools, you can't really do any useful image processing.
    Bruce
    Bruce Ammons
    Ammons Engineering

Maybe you are looking for

  • My provider is Time Warner , trouble activating channels

    My provider is Time Warner cable, iv'e tried to activate some channels like Disney, and when I put in the activation code my provider isn't on the list. What exactly does that mean? Am I out of luck with that channel?

  • Productsign help

    Hello all! I am having difficulty understanding the signing of Packages, which I use for Distribution outside of the App Store. I have a valid Apple Developer Installer certificate I use with the `productsign --sign` command which I will demonstrate

  • When in Firefox, my taskbar covers the horizontal scroll bar. How do I change it so that it wont?

    When I'm in Firefox, the taskbar at the bottom of the screen hides the horizontal scroll bar. How do I get the scroll bar to be visible?

  • OWB Error ENT-06972 when trying to view dimension data

    Hi, I got this error while trying to view the data I just loaded into a particular dimension: ENT-06972: Error while Displaying BIBean for Dimension Dataviewer. (and when I clink on "Details"): ENT-06972: Error while Displaying BIBean for Dimension D

  • Variants Missing

    Hi I understand if variants from 3.x are not imported into 7.0 then we can a program RSR_VARIANT_XPRA ........ But please tell me where we would run this program can anyone give me steps... regards Naga