Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is this possible NULL AS Placeholder

Re: Is this possible NULL AS Placeholder

From: victor <victor_at_POST.pb>
Date: 4 Nov 1998 09:24:16 GMT
Message-ID: <01be07d4$d36a8ff0$6b14abcc@victor>

Eric Euerlings <euerlings_at_swift.ch> wrote in article <71p1po$ngt$1_at_bw107zhb.bluewin.ch>...
> Hi,
> I ' ve to port code from SQL Anywhere to ORACLE.
> They used a NULL as placeholder. How can I do that in ORACLE.
>
> create or replace view
> v_angebot_teilangebot(mandant,
> abteilung,
> periodentyp,
> periode,
> angebot,
> teilangebot,
> angebotsstruktur)
> as select angebot_teilangebot.mandant,
> angebot_teilangebot.abteilung,
> angebot.periodentyp,
> angebot.periode,
> angebot_teilangebot.angebot,
> angebot_teilangebot.teilangebot,
> null // IS THIS POSSIBLE IN ORACLE ?
> from angebot
> ,angebot_teilangebot
> where(angebot_teilangebot.mandant=angebot.mandant)
> and(angebot_teilangebot.abteilung=angebot.abteilung)
> and(angebot_teilangebot.angebot=angebot.angebot)
> union select angebot.mandant,
> angebot.abteilung,
> angebot.periodentyp,
> angebot.periode,
> angebot.angebot,
> 0,
> angebotsstr.angebotsstruktur
> from angebot , angebotsstr
> WHERE(
> angebot.mandant=angebotsstr.mandant(+)
> and angebot.abteilung=angebotsstr.abteilung
> and angebot.angebot=angebotsstr.angebot);
>
> IF I TRY THIS, IM GETTIG :
>
> null
> *
> ORA-01790: expression must have same datatype as corresponding expression
>
>
> Thanks in advance
>
> Eric
>
>
>
>
>

THIS MEANS WHAT ORACLE DONT KNOW THE DATATYPE OF angebotsstruktur COLUMN

YOU MUST DO LIKE THIS
CREATE VIEW VA(A1,A2)

                  AS SELECT 
                         A1,TO_NUMBER(NULL)
                         FROM A;

(OR TO_CHAR(NULL)) Received on Wed Nov 04 1998 - 03:24:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US