Home » Open Source » MySQL » MySQL to SQL (Oracle, 10.2.0.3.0, XP)
MySQL to SQL [message #480324] Fri, 22 October 2010 08:04 Go to next message
Queztapotel
Messages: 3
Registered: October 2010
Junior Member
sorry failed to load page error, made my think it weren't posted.
please delete this one

[Updated on: Fri, 22 October 2010 08:17]

Report message to a moderator

Re: MySQL to SQL [message #480330 is a reply to message #480324] Fri, 22 October 2010 08:19 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
You'll have to post again. I deleted all but one. Looks like I deleted the original.
Re: MySQL to SQL [message #480335 is a reply to message #480330] Fri, 22 October 2010 08:39 Go to previous messageGo to next message
Queztapotel
Messages: 3
Registered: October 2010
Junior Member
CREATE OR REPLACE TRIGGER trigger1
	AFTER INSERT ON table1
	FOR EACH ROW
  DECLARE 
	NOW(), -- TIME_STAMP
    NEW.ID, -- BC_ID
    NEW.BC_STATUS, -- BC_STATE
    NEW.BUSINESS_PROCES_FK, -- BUSINESS_PROCESS_ID
    1, -- BUSINESS_CASE_PRIORITY
    NULL, -- BUSINESS_CASE_DURATION
    NEW.CLIENT_FK -- CLIENT_ID
  BEGIN
      INSERT INTO table2(
        TIME_STAMP,
        BC_ID,
        BC_STATE,
        BUSINESS_PROCESS_ID,
        BUSINESS_CASE_PRIORITY,
        BUSINESS_CASE_DURATION,
        CLIENT_ID
      )
   END;

[Updated on: Fri, 22 October 2010 08:40]

Report message to a moderator

Re: MySQL to SQL [message #480338 is a reply to message #480335] Fri, 22 October 2010 08:50 Go to previous messageGo to next message
cookiemonster
Messages: 13958
Registered: September 2008
Location: Rainy Manchester
Senior Member
And?
Is that code you have?
Is it supposed to be oracle or mysql?
What is the problem?
Re: MySQL to SQL [message #480341 is a reply to message #480338] Fri, 22 October 2010 08:56 Go to previous messageGo to next message
Queztapotel
Messages: 3
Registered: October 2010
Junior Member
Oh sorry i didn't saw that my originally post was deleted to. So, this is my MySQL Code and i would like to translate it into SQL suited for Oracle 10G.
Re: MySQL to SQL [message #480343 is a reply to message #480341] Fri, 22 October 2010 09:09 Go to previous messageGo to next message
cookiemonster
Messages: 13958
Registered: September 2008
Location: Rainy Manchester
Senior Member
Then might I suggest that you actually describe what it does for those of us who don't know mysql. Cause to me it looks completely meaningless.
Re: MySQL to SQL [message #480365 is a reply to message #480335] Fri, 22 October 2010 13:03 Go to previous message
Barbara Boehmer
Messages: 9100
Registered: November 2002
Location: California, USA
Senior Member
CREATE OR REPLACE TRIGGER trigger1
  AFTER INSERT ON table1
  FOR EACH ROW
BEGIN
  INSERT INTO table2 
    -- column names in table2 to insert into:
    (TIME_STAMP,
     BC_ID,
     BC_STATE,
     BUSINESS_PROCESS_ID,
     BUSINESS_CASE_PRIORITY,
     BUSINESS_CASE_DURATION,
     CLIENT_ID)
  VALUES 
    -- values, including :new values from table 1
    -- to insert into table2:
    (SYSTIMESTAMP,
     :NEW.ID,
     :NEW.BC_STATUS,
     :NEW.BUSINESS_PROCESS_FK,
     1,
     NULL,
     :NEW.CLIENT_FK);
END trigger1;
/
SHOW ERRORS

Previous Topic: connect java application with mysql
Next Topic: Encrypt error using PHP
Goto Forum:
  


Current Time: Sat Nov 23 22:16:15 CST 2024