From: Bjoern R. <bjo...@rr...> - 2005-04-05 11:26:13
|
Hi, of course. Here they are: (I've removed duplicates with parallel structure and only different tabels or fields) =20 ALTER TABLE IMP_DOZS ADD "RefPersons" COMPUTED BY (( SELECT p."Id" FROM "IM= P_PERSONS" p WHERE p."Key" =3D IMP_DOZS."PersonenReferenz" )); My be this is a problem. A computed column which is based upon another computed column: ALTER TABLE OK_LV ADD "Name" COMPUTED BY ((SELECT "Name" FROM OK_LA LA WHER= E LA."Id" =3D OK_LV."RefLA")); ALTER TABLE OK_LV ADD "XName" COMPUTED BY (COALESCE('('||"Nummer"||') ','')= ||"Name"); ALTER TABLE OK_LVBEWERBER ADD "StudentenBetrag" COMPUTED BY ((CASE WHEN ("R= efLV" > 0) THEN (SELECT "Betrag" FROM "PROC_LVGetEntgelt"(OK_LVBEWERBER."Re= fLV",OK_LVBEWERBER."RefStudent")) ELSE 0.00 END)); ALTER TABLE OK_LVTERMINMETA ADD "WochenTag" COMPUTED BY ( ( SELECT "Bezeich= nung" FROM PROC_DOW("OK_LVTERMINMETA"."Dow"))); ALTER TABLE OK_PERSON ADD "Passwort" COMPUTED BY ((CASE WHEN ((CURRENT_ROLE= =3D 'GURU') OR (CURRENT_USER =3D "Login")) THEN ((SELECT "Passwort" FROM O= K_PERSONSHADOW WHERE OK_PERSONSHADOW."RefPerson" =3D OK_PERSON."Id")) ELS= E '********************' END)); ALTER TABLE OK_PERSON ADD "XName" COMPUTED BY ((COALESCE (NULLIF("ATitel",'= ') || ' ','') || COALESCE(NULLIF("Vorname"||' ',''),'') || COALESCE(' ' || = NULLIF("MTitel",'') || ' ','') || COALESCE(NULLIF("Name",''),'') || COALES= CE(' ' || NULLIF("PTitel",''),''))); ALTER TABLE OK_STUDENT ADD "IsImported" COMPUTED BY ((CASE WHEN (("Imported= From" IS NOT NULL) AND ("ImportedFrom" > 0)) THEN 1 ELSE 0 END)); =20 LS> Bj=F6rn, >> >> Do you have another idea? >>=20 >> DY> Yes. Do you use computed columns? >>=20 >> Of course! >> Are they bad? LS> Not per se, but there are issues with the backup/restore process with c= omputed columns. LS> Can you provide some examples of the computed columns from your databas= es. LS> We are reviewing the GBAK routine to handle computed columns LS> and we would like to ensure that as many issues as possible are LS> taken into account by the changes. LS> Sean Bj=F6rn --=20 Bj=F6rn Reimer -- RRZE |