Comparing converted text until then with the Date column

I have a question where I need out of a text column in a date format and then compare this column against another column in the same table, which is already to date format. I tried to use a sub query to avoid doing this in two steps, but get a:

"ORA-01858' a non-digit character was found here where was waiting for digital"

error message that obviously has something to do with the date formatting in the subquery: the types do not match.

Note: clock_num is a text column and contains the numbers are supposed to be dates like 070111 - where the need for conversion to a date type to match the stat_date which is the type of date column. I have no control over the data in this column. It is not my picture, is the picture of the society and I have to use!

So my question is what syntax/function should I use to get the type of expression clock_nbr the type of eff_date.

Or y at - it another way to do the same thing without using subquery?

Any help is appreciated...

SELECT
me. SSN,
Of
member_enroll me
WHERE me.ssn = '999999999'
AND me.stat_date <
(SELECT to_date (substr (me.clock_num, 1, 2) |)) » /' || substr (me.clock_num, 3, 2) | '/' || substr(me.clock_num,5,2), 'mm-DD-yy') as clock_nbr
OF member_enroll me
WHERE me.ssn = '999999999')

I have no experience with PL/SQL Developer. Any chance you could launch SQL * more and copy / paste of a session where you run this code?

You should only run the DDL to create the function once. If the second query runs, you have managed to successfully create the function. My hypothesis is that whatever 'window SQL' you are talking about and what you mean by 'run' is the cause only the function must be created. Most of the IDEs have a function to execute current SQL statement, without taking into account other statements that can be registered in the same window, and a separate function to execute all instructions in the current window. Different iDEs have different requirements to separate several SQL statements if you want to run all of the SQL statements in a window. You may need to do something like the added statement a / after the CREATE FUNCTION as a separator.

Justin

Tags: Database

Similar Questions

  • Compare a date with the date system

    Hello

    I use the script (that I found in this forum) in below in order to obtain a date of datefield1, add a year and give the date of datefield2.

    It works very well.

    Kai var = util.scand ("yyyy-mm-dd", this.rawValue);
    var sFullYear = oDate.getFullYear ();
    var sMonth = oDate.getMonth ();
    sDate var = oDate.getDate ();
    Datefield2.FormattedValue = util.printd ("JJ", new Date ((sFullYear+1), sMonth, sDate));
    Datefield2.RawValue = Datefield2.formattedvalue;

    But now I would compare the new date (David [added a year]) with the date current system (cDate).

    Does anyone have an idea how to compare dates? The result should change color as below.

    If (David < cDate) {}
    Datefield2.fontcolor = "255,0,0";
    }

    Thank you very much.

    Kind regards

    ra_be

    Try to use the Date of Javascript object:

    var myDate = new Date();
    myDate.setFullYear (2010,0,14);
    var today = new Date();

    If (myDate > today)
    {
    Alert ("the date is before January 14, 2010");
    }
    on the other
    {
    Alert ("today, it is after January 14, 2010");
    }

    If this does not work, try the analysis on the month, day and year, and then do a comparison on all of them (without forgetting to convert strings of months an integer. For example if you store the release date: February 2, 2009, February goes to 2).

    Then your comparison would look like:

    if(myYear == sysYear) {}

    if(myMonth == sysMonth) {}

    if(myDay == sysDay) {}

    days are equal

    }

    Else if (myDay<>

    myDay is before sysDay
    }

    else {}

    myDay is after sysDay

    }

    }

    }

    essentially to follow this same logic for comparisons of month and year and it should work as well.  It would be certainly cleaner and much easier using this Date however (http://www.w3schools.com/jsref/jsref_obj_date.asp)

  • problem with the data record

    Hi, I'm new to LabView so I know that the thing I'm doing is relatively easy, however, I'm stuck.

    I made a small program that gets 5 steps (for now replaced with random numbers) and as well as the date and time data in the text file. I intend to run the program for long periods of time, so I want to increment the file name/path every hour, but after the addition of this part of the program does not create any file, although the program runs without error.

    Block diagram is attached, could someone point out to me what is wrong and what I should do to reach my goal?

    Thanks in advance!

    Hi marcis,.

    Acually, the logic of the program was completely wrong.

    1. your comments the file path will never help you. Because after leaving of while loop, the structure of matter will run once and LV will stops running.

    2. open and close the datalog only once file. Try to make all your manipulations between opening and closing your file datalog. Otherwise, it will be difficult to manage when you develop your code.

    3 case construction outside the loop is meaning less. If you want to run the program permanently, place all functions inside the while loop you want to run. While the loop will run continuously until you get satisfied.

    4. incorrect data streams. All programmers need well with the data stream.

    Just go into the basics of labview here and try to realize your logic again

  • How to compare one by an element of a column with the first column in the other table?

    Hello

    I have two files into a single file has only Id numbers and the second file has table with for example the column 4, and his first column identification number.

    So I want to compare the first item in the User.ID file with the 1st column all the table file items in this column until it finds matches.

    If compare match then LED will be IT other wise LED will be OFF.

    Here as an attachment, I've attached the two file.

    Please guide me how can I do the same thing.

    Thank you much in advance.


  • Problems with the data connection

    Hello
    I bought a Z3 Compact Xperia on December 10, 2014. I live in Italy and I use Vodafone as my everyday.
    I got a SIM card replacement nano with LtE capabilities just to get the phone in the new fast network. The problem I encounter is that, since on January 13, 2015, I had some problems with the data in mode 3 G connection.
    So far, I used my phone normally, then I tried to send a text message with WhatsApp and phone stuck with the clock icon in the lower corner of the bubble of the message. I thought it was a temporary network problem but I'm not sure about this.
    I live in a small town where the coverage is really good, either in 3G and LTE. I tend to use the 3G because it uses less battery and it does not affect my 4G data plan.
    Th issue, it's that if I do a speedtest when I feel that network glitch I have a ping, but with very good download speeds up to 2000ms.
    The problem is that I believe that this is not a network problem because my mother has a phone HtC One S and runs vodafone without problem even when I'm having the glitch.
    I tried to reset the phone to factory settings, but it did not help.
    In LTE / 4G I do not experience this issue. In fact, I think if there is problem need a phone related software because the antenna works very well.
    If it doesn't I'll try to contact ad Vodsfone then I'll send my phone for the helpdesk if Vodafone tell me that the question is not on their network.

    Thanks in advance for your help.
    Simone

    It's pretty strange, double check the APN settings and contact EE in this regard.

  • How to make a list of question field with the data type DATE?

    I have a column with the DATE data type. Using forms 6i I want to generate a poplist field of list item with this column while the value of the items in the list of names of days like SATURDAY, SUNDAY, MONDAY. If we change the date to a char data type, it won't work properly, but now with the data type DATE behind him, it gives the following error message

    "FRM-32082: invalid value for given the type of element."
    List WEEKREST
    Article: WEEKREST
    Block: EMPRESTS
    Form: module 3
    FRM-30085: unable to adapt to the shape for the release. »


    Using forms 6i how a list item field type DATE data which may contain names of days?

    Set your date as a hidden field (not shown) column. Create your item list with the names of day of varchar2. Create the list item as a base table field that accepts the values of text in the names of the days. On this area, create a when-validate-item trigger that translated the text into an actual date that it then uses to set the value of the real object of the base table.

  • MX:DateField screened with the date to a string database

    Hello

    I have a date in the database, in the format string that is dd-mmm-yyyy.

    I want this date to be shortlisted in the datefield (on the calendar), for that I need to convert this string to a date object and then connect it with the mx:datefield.

    I found that there is a function stringToDate(), but which is not applicable in my case or may be I do not use it correctly. I also found parseDateString which was also not useful.

    What is the best way to do it? can someone help me with this?

    Thanks in advance,
    Gaze

    Thank you guys for all your help and your time. I have some successful how to find a solution. :)

    I used a split function to cut off date to date, month and year.
    date_exp var: String = _userDetails.date;
    var date1:Array = exp_date.split ('-');
    var date: int = date1 [0];
    var Lun: String = date1 [1];
    var year: int = date1 [2];

    The month of the converted entire string and then selected the date in the using Datefield
    expDate.selectedDate = new Date (year, intMon, date);

    Thank you
    Gaze

  • Error 0x80040E57 then store the date and time to the database

    Hello

    I'm using Labview 2009 for storing the date & time of microsoft database but I get an error (0x80040E57), which specifies that the field is too small to accept the amount of data, I'm trying to enter. A screenshot of the error message and the VI is put in an attachment. Please suggest a solution for this.

    Thank you

    Guilhem

    Hi Marion,.

    I looked a bit in question and found that the error occurs when one of your columns of database is too small to contain the data that you are trying to (see page 236 of this PDF). The data initially a problem is going to be one of the strings that you are trying to insert. I guess you circled in red is the origin of the problem.

    I found a client who had a very similar problem. Here's how, he said, he has solved this problem:

    I found the problem. The problem that you said was in the database. The "Date" column in the database table has been specified to enter 9 characters only. So when I ran the program on 12/02/2011 it ran for a week until 2011-12-09 23:59. So 2 to December 9, the total for the date format characters were 9 (if you add them) but as soon as the date changed to 12/10/2011 at 12:00 midnight the total number of characters were 10 (more than 9) and that's why he stopped at 23:59 on 09/12/2011. I changed the number of characters to 10 now and its working very well.

    Then you can check your database to make sure that it is large enough to accept this entry.

    I hope this helps.

    Trey Keown

    Technical sales engineer

    National Instruments

  • Problems with the date and time - have to reset the date & time on reboot

    original title: problems with the date and time

    Whenever I turn on my computer (Windows XP 2002) I click on F2.  Then I re - set the date and time it occurred in January 2006 1 h every time I have turn off the computer.  Can someone tell me what I need to do?

    You need to replace the battery in time clock (RTC) real of your computer.  It can also be called the CMOS or BIOS battery.

    Many computers, this battery is an inexpensive CR2032 button available in almost every pharmacy corner.  There are, however, some computers (especially laptops) that require a different (and probably more expensive) battery.

    Whatever the expense, almost all of these batteries are easy to replace.

    To get help, post back with the brand and model of your computer.

  • What happens with the data on ROW as soon as they are storage migrated to VMDK?

    Hi all

    The following scenario: I have a virtual machine with virtual RDM. I have storage migration online, selection of thick discs so convert the VMDK RDM. The question is: what is actually happening with the data on the LUN that was RDMs, once the migration is complete?

    I expect that the data are still there, and if needed, I can remove the VMDK and re - attach the new LUNS as RDM.. But I can't find any official information on this.

    I am not mistaken? Y at - there somewhere that says clearly what is happening with the data?

    Thank you!

    Your wait is quite correct. The data on the raw LUN will not get affected once it is converted to a virtual machine. Only the mapping of RDM file is deleted and the LUN becomes available, and you can use card or again as an RDM or to create a VMFS data on that store.

    André

  • How to keep line breaks in CSV, TXT doc then merge the data in CC?

    Hey,.

    There is a thread for this question, answered in 2009, then in 2014 (that wasn't there is still no ideal integrated solution):

    https://forums.Adobe.com/thread/415563?start=0 & tstart = 0

    But I was wondering if Indesign CC2015 made no progress in this regard...?

    Thank you

    Vanessa

    In simple, no words. With the exception of the variable QR codes, merge data has remained the same since that post.

    The current solution of:

    • put a delimiter in the source file, such as
      or | to represent the newline; then
    • Merge into a new indesign file and use find/replace to replace the separator for a line break

    Is always the simplest solution with the data merge.

    Data merge isn't the only way to import variable data. XML is another way, but the learning curve is steep. The rewards are worthwhile, but prepare to invest some many hours in learning!

    Otherwise, perhaps consider a third party plug-in which may be more appropriate than merge data.

    Rest assured, you are not alone. All I can suggest is to go to the feature request/Bug Report Form and the application as a feature request.

    Colin

  • How do I date stamp photo with the date that it was created?

    How do I date stamp photo with the date that it was created?

    donaldm80418165 wrote:

    How do I date stamp photo with the date that it was created?

    Use the text tool.

    Note that you can select the font, color, size of the pt.

  • I am new to Adobe, I created an Excel file that I convert the file to PDF, but the converted PDF file shows all the data, missing on the right side of the page

    I am new to Adobe, I created an Excel file that I convert the file to PDF, but the converted PDF file shows all the data, missing on the right side of the page

    Hi Tony,.

    In Excel, click on the Acrobat toolbar, and then click Preferences.

    Now select the option 'Fit the worksheet to a single page' and click ok

    Now, try to convert and check.

    Kind regards

    Rave

  • Compare a column varchar2 with a date column segment


    Dear all,

    I have a column with the data type varchar2 with the sample of data such as segment ' 2013/06/09 00:00:00 ', I want to compare this column by date column

    I tried many ways to conversion but does not like

    Select to_date (TO_NCHAR (substr (' 2013/06/09 00:00:00 ',1 11),' DD-MM-YY '))DATE_C of double-> giving invalid number

    Select TO_TIMESTAMP (TO_NCHAR (substr (' 2013/06/09 00:00:00 ',1 11),' DD-MM-YY '))DATE_C of double-> giving invalid number

    Can I have any suggestion for this please

    Thank you and best regards

    Hello

    Use something like this:

    Select to_date (' ' 2013/06/09 00:00:00 ', ' DD/MM/RRRR HH24:MI:SS') twice;

    Thank you &

    Best regards

  • Need help with the data storage store, local array and network connections

    Need help with my ESXi 4.1 installation

    My hardware:

    I built a server with an Asus P6T whitebox, i7 920, 12 Gig RAM, NIC, Intel Pro1000 PT Quad, 3ware 9650SE-12ML with 8 1.5 TB SATA green in a raid 6 array gives me about 8 + TB with a spare drive all housed within a NORCO RPC-4220 4U Rackmount Server chassis.  I also have a 500 GB SATA drive which will hold the ESXi and virtual machines.

    The network includes a firewall, Netgear Prosafe FVS336G, GS724Tv of Netgear ProSafe 24 port Gigabit Managed Switch on a dhcp cable modem internet service provider.

    I also have 2 old NetGear SC101T NAS disks (4to) I want to connect to the system how some - at a later date have... data on them and want to transfer to the new storage array. I always looking into the question of whether they will work with ESXi 4.1, or I might have to only access it through Windows XP.

    My Situation:

    I have already installed ESXi 4.1 and vsphere client with no problems and it is connected to a dhcp cable internet service.  I've set up host via a dynamic DNS service name give me a static hostname on the internet.  I installed three machines to virtual OS successfully at the moment and now want to first start by creating a multimedia storage server which will use some of this new 8 TB array, then separate data storage for use with a web server small overhead storage and a backup.  It is a domestic installation.

    Help with the data store and network:

    I was doing some reading, because I'm new to this, and it looks like I'll probably want to set up my table via ESXi as a nfs disk format.  Now, the data store is usually in another physical box from what I understand, but I put my readers and ESXi all in the same box.  I'm not sure that the best way to put in place with grouped network cards, but I want to make this work.

    I understand that in ESXi 4.1 using iSCSi LUN must be less than 2 TB, but nfs - I should be able to add a bigger partition then 2 TB (for my multimedia) in nfs, right? or should I still add it separately as a separate 2 TB drives and then extend them to get the biggest space.

    Any suggestions or direct resources showing examples on how to actually add some parts of the table as data warehouses separate nfs.  I know that to go to the configuration tab, and then select Add to storage, and then select nfs. I have not my picture, but it's here that I don't know what to do because ESXi 4.1 system already has an address, should I put the same thing to the new data store array also (will it work?), and what should I use for the name of the folder and the store of data... just do something to the top.  I thought to later install Openfiler (for a multimedia storage using this table server) as a virtual machine, use the table with esxi so that I can access the same storage space with widows and linux-based systems.

    I also know I have to find a way to better use my quad nic card... put in place of virtual switches, grouping, etc HELP?

    Any direction, assistance, similar facilities to sample, suggestions or resources that would help would be great. I did a lot of hunting, but still a little confused on how to best to put in place.

    You must think of VMDK files of large databases with records of random size guest go read some data (a DLL or an INI file), maybe write some data back, then go read other data. Some files are tiny, but certain DLLs are several megabytes. It's random i/o all and heavy on the search time. IO Opsys is small random operations that are often sequential (go read data, write data, go read other data,...) so that deadlines are critical to the overall performance. That's why people say OPS are / s of reference and forget the MBs flow. The only time where you bulk transfers are when you read media (ISO files).

    Well, now forget all this. Actually the disk activity will depend on the specific applications (database? mail server? machines compiler?), but the above is true for boots, and whenever applications are idle. You should see the profile to know.

    RAID 10 is faster (and often more reliable) than RAID 5 or RAID-6 except in certain specific cases. In General RAID 10 is ideal for many random writes, since the calculation of parity for RAID-5 and - 6 adds to the overall latency between command and response - latency is cumulative if a little slow here and a little slow it adds up to a lot of overall slow synchronous especially with e/s on a network. OTOH RAID-5 and -6 can produce faster readings due to the number of heads, so you can use it for virtual machines that transfer bulk. Test. You may find that you need several different types subdashboards for best results.

    You said 3ware, they have some good grades on their site, but don't believe it. With my 9650 that I found myself with only a couple of their recommendations-, I put the (simple) table for allocation size 256 k, nr_requests at 2 x the queue_depth and use the planner date limit. I had the habit for the Ext4 file system formatted with stride and stripe-width synced to the table and used the options large_files with fewer inodes (do not use the huge_files option unless you plan to have single VMDK files in the terabyte range). Use a cache of great reading in advance.

    Virtual machines use VMDK files in all cases except raw iSCSI LUN that they treat native disks. VMDK is easier to manage - you can make a backup by copying the file, you can move it to a PC and load it into another flavour of VMware, etc. There could be some features iSCSI to your San as a transparent migration but nothing for me. NFS has less chatter of Protocol if latency lower times to complete an operation. NFS is good to read and write a block of data, that's all it boils down to.

    UPS is good, but it won't help if something inside the machine explodes (UPS does nothing if the PC power supply goes down). If the RAID card has an option for a battery backup module, so it can contain some writings in memory and may end up the disk i/o after replacing the power supply. 3ware also limits the types of caching available if help is not installed, and you get just the right numbers with the module.

Maybe you are looking for

  • Apple: Can allow you parents more control over the access of children iTunes?

    Parental restrictions on mini iPad 16 GB of my granddaughter running iOS 9.3.5 (original version) do not seem to allow parents to control properly the child access iTunes. We have music, news and Podcasts (iTunes), reserved for the 'Clean' as opposed

  • Clear the credentials of Proxy of the pop-up box?

    Accidentally, I clicked 'Save password' by connecting to my corporate proxy and not everytime I open the browser that the credentials are pre-populated. I need have to disappear and have the empty box every time I open the browser. Looked around for

  • You have to worry that my social media/email is compromised on macbook?

    I just clicked on a link facebook earlier that led me to a site 'facebook' false asking me to give them permission to access my public profile, I clicked on "Cancel" on the pop up instead of just close the tab (yes I know it's stupid). Then he took m

  • Forget ID apple...

    Hi dear supporters I have 6 offers users another iPhone This users forget your email password and your security issues on Apple ID but you know Apple ID and password but this Apple ID s locked and I could turn off not find my iPhone menu,. * I know a

  • Satellite M30-404: cannot change display brightness and THCI.dll is missing

    Hello! 1. a few days I did a reinstall of XP. Now, I can not change the brightness of the screen. FN + F6/F7 does not work. 2. when I start the computer, a message appears > an application cannot start because THCI.dll be found. A new installation of