update sequence immediately

This commit is contained in:
Carlos Ruiz 2007-02-14 04:17:56 +00:00
parent 0ba3d62cb7
commit d78bbc4a56
2 changed files with 34 additions and 24 deletions

View File

@ -1,12 +1,19 @@
insert into AD_MESSAGE ( INSERT INTO ad_message
"AD_MESSAGE_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY","UPDATED","UPDATEDBY", (ad_message_id, ad_client_id, ad_org_id, isactive, created,
"VALUE","MSGTEXT","MSGTIP","MSGTYPE","ENTITYTYPE" createdby, updated, updatedby, VALUE,
) msgtext, msgtip, msgtype, entitytype
values ( )
50007,0,0,'Y',to_date('12-02-2007','DD-MM-RRRR'),0,to_date('12-02-2007','DD-MM-RRRR'),0, VALUES (50007, 0, 0, 'Y', TO_DATE ('12-02-2007', 'DD-MM-RRRR'),
'Charset','Charset','Charset used for import / export','I','D' 0, TO_DATE ('12-02-2007', 'DD-MM-RRRR'), 0, 'Charset',
); 'Charset', 'Charset used for import / export', 'I', 'D'
);
commit; COMMIT ;
-- Run sequence check UPDATE ad_sequence
SET currentnextsys = (SELECT MAX (ad_element_id) + 1
FROM ad_element
WHERE ad_element_id < 1000000)
WHERE NAME = 'AD_Message';
COMMIT;

View File

@ -1,15 +1,18 @@
insert into AD_MESSAGE_TRL ( INSERT INTO ad_message_trl
"AD_MESSAGE_ID", "AD_LANGUAGE", "AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY","UPDATED","UPDATEDBY", (ad_message_id, ad_language, ad_client_id, ad_org_id, isactive,
"MSGTEXT","MSGTIP","ISTRANSLATED" created, createdby, updated, updatedby, msgtext, msgtip,
) istranslated)
select SELECT m.ad_message_id, lang.ad_language, m.ad_client_id, m.ad_org_id, 'Y',
m.AD_Message_ID, lang.AD_Language, m.AD_Client_ID, m.AD_Org_ID, 'Y', m.Created, m.CreatedBy, m.Updated, m.UpdatedBy, m.created, m.createdby, m.updated, m.updatedby, m.msgtext, m.msgtip,
m.MsgText, m.MsgTip, 'N' 'N'
from AD_Message m, AD_Language lang FROM ad_message m, ad_language lang
where WHERE m.ad_message_id = 50007
m.AD_Message_ID = 50007 AND lang.issystemlanguage = 'Y'
and lang.IsSystemLanguage='Y' and lang.IsBaseLanguage='N' AND lang.isbaselanguage = 'N'
and not exists (select * from AD_Message_TRL m2 where m2.AD_Message_ID=m.AD_Message_ID and m2.AD_Language=lang.AD_Language) AND NOT EXISTS (
; SELECT *
FROM ad_message_trl m2
WHERE m2.ad_message_id = m.ad_message_id
AND m2.ad_language = lang.ad_language);
commit; COMMIT ;