Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
07-09-2012, 08:55 PM #1
- Join Date
- Apr 2012
- St. Louis, MO
- Thanked 101 Times in 101 Posts
ORACLE - SELECT (I'm sure I'm missing something simple)
I am trying to set up a form that will delete very specific records in a database. The table contains information on who has completed what training. This is annual training, so the same user/course can appear more than once. I need to be able to delete a specific course (ie, if the user has taken course 109 three times in four years, but the database shows four times in four years, I need to remove the one that isn't valid.)
I'm trying to do this based on user id, course id, and the datetime the course was recorded at.
The delete isn't working, and in an attempt to find out why, I'm trying to SELECT the record, first, to no avail even though it exists. In the database there is the following record:
CID UID COMP_DATE
109 DRYSJC 2012-06-27 10:24:57.0
SELECT * FROM tableA WHERE upper(UID) = 'DRYSJC' AND CID = 109 AND to_date(COMP_DATE,'YYYY-MM-DD HH24:MI:SS') = to_date('2012-06-27 10:24:57','YYYY-MM-DD HH24:MI:SS')
UPDATE: Removing the to_date() from around COMP_DATE but leaving it around the value worked. ???
Last edited by WolfShade; 07-09-2012 at 10:06 PM. Reason: Fixed it^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".