Subject | RE: [IBO] TIB_DataPump |
---|---|
Author | Alan McDonald |
Post date | 2004-02-28T10:36:15Z |
Can you try this ?
In your SP as below, declare a variable
DECLARE VARIABLE V_MYCODE VARCHAR(36);
Then in the first line of the SP assign your input parameter to the V_MYCODE
Then replace all :MYCODE below with V_MYCODE.
(3 places) and test.
Alan
In your SP as below, declare a variable
DECLARE VARIABLE V_MYCODE VARCHAR(36);
Then in the first line of the SP assign your input parameter to the V_MYCODE
Then replace all :MYCODE below with V_MYCODE.
(3 places) and test.
Alan
> Sorry, is in Italian.....
>
> And this is what I want to do:
> IF (EXISTS(SELECT MYCODE FROM SOCI WHERE (MYCODE = :MYCODE))) THEN
> UPDATE SOCI
> SET COGNOME = :COGNOME,
> NOME = :NOME,
> TITOLO = :TITOLO,
> INDIRIZZO = :INDIRIZZO,
> CAP = :CAP,
> SESSO = :SESSO,....
> ETA = :ETA,
> GIUDIZIO = :GIUDIZIO,
> DA_RICHIAMARE = :DA_RICHIAMARE
> WHERE (MYCODE = :MYCODE);
> ELSE
> INSERT INTO SOCI (
> MYCODE,
> COGNOME,
> NOME,
> SESSO,....
> ETA,
> GIUDIZIO,
> DA_RICHIAMARE)
> VALUES (
> :MYCODE,
> :COGNOME,
> :NOME,
> :SESSO,
> :ETA,
> :GIUDIZIO,
> :DA_RICHIAMARE);
>