Home » SQL & PL/SQL » SQL & PL/SQL » Java-script and Oracle DB updating a table item (Oracle HTML DB 2.0.0.00.49)
Java-script and Oracle DB updating a table item [message #444221] Fri, 19 February 2010 07:26 Go to next message
nik0lla
Messages: 17
Registered: February 2010
Location: Canada
Junior Member
Hey Guys,

Still new to the whole oracle+java-script.

My goal: I want to use java-script to open a prompt to see if the user wants to change the date of a work order (Located in Work_order_info called "opened_date")

What I have so far:


        var n = prompt("Is the checklist starting now? (Type either y or n)", "y or n");

        if (n == "y" || n == "Y"){
          alert("The opened date has now been changed!");
        }else if (n = "n" || n == "N"){
          alert("The opened date has not been changed! Sorry to bother you");
        }else{
          alert("You needed to type either n or y, nothing else!");
        }


What I need assistance on: I'm not entirely sure how to tell the table to change the opened_date to sysdate. I'm sure it's really simple >.> thanks!
Re: Java-script and Oracle DB updating a table item [message #444225 is a reply to message #444221] Fri, 19 February 2010 08:03 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
I do not see any Oracle code here. You want want to ask your question in a javascript forum.

As for you question how to set a column to sysdate, it is
column_name:=sysdate;

or
update table set column_name=sysdate where ...;
Re: Java-script and Oracle DB updating a table item [message #444226 is a reply to message #444225] Fri, 19 February 2010 08:07 Go to previous message
nik0lla
Messages: 17
Registered: February 2010
Location: Canada
Junior Member
Apologies. I was only thinking about how it was changing oracle and written in oracle. Makes sense. Thanks for the assistance.
Previous Topic: A question about model clause (merged by CM)
Next Topic: missing data
Goto Forum:
  


Current Time: Sun Dec 04 22:46:33 CST 2016

Total time taken to generate the page: 0.21838 seconds