Hi there! I am working on an Oracle 8 DB. We use a CRM Tool at our helpdesk and a special module which includes fields such as name, first name, address,...
The module can look up the DB for existing calls/requests.
My problem is: when a request is found in the DB, the new content is not added, but is replacing the former text.
Can you help? I am a novice in SQL. The following procedure has been generated by the module, which provides a GUI.
Thanks a lot in advance!
Matthieu
____________________
if (NB_AFFAIRES=1) then
update AFFAIRES set AFFAIRES.AF_REMARQUE=P_Nachricht,AFFAIRES.T9_CODE= P_Kontaktart,AFFAIRES.AF_INFO_COMP30=P_Vorgangsnum mer,AFFAIRES.T20_CODE=P_Medium_Antwort,AFFAIRES.AF _INFO_COMP25=P_VIN,AFFAIRES.AF_INFO_COMP11=P_EZD,A FFAIRES.AF_INFO_COMP6=P_Km_Stand,AFFAIRES.AF_INFO_ COMP16=P_NoVorgang,AFFAIRES.T7_CODE=65 where AF_CODE=V_AF_CODE;
else
select SEQ_AFFAIRES.nextval into V_AF_CODE from dual;
insert into AFFAIRES (AFFAIRES.AF_REMARQUE,AFFAIRES.T9_CODE,AFFAIRES.AF _INFO_COMP30,AFFAIRES.T20_CODE,AFFAIRES.AF_INFO_CO MP25,AFFAIRES.AF_INFO_COMP11,AFFAIRES.AF_INFO_COMP 6,AFFAIRES.AF_INFO_COMP16,AFFAIRES.T7_CODE,AFFAIRE S.AF_DATE_CREA,AFFAIRES.AF_DATE_CONT,AFFAIRES.REFE RENCE,AFFAIRES.AF_CODE) values (P_Nachricht,P_Kontaktart,P_Vorgangsnummer,P_Mediu m_Antwort,P_VIN,P_EZD,P_Km_Stand,P_NoVorgang,65,sy sdate,sysdate,V_REFERENCE,V_AF_CODE);
end if;