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: Oracle SQL 7.3, 8.0,8.1,8.1.7,9......

Re: Oracle SQL 7.3, 8.0,8.1,8.1.7,9......

From: Dennis Chebotarev <dddennn_at_pacbell.net>
Date: Wed, 13 Feb 2002 00:10:43 GMT
Message-ID: <7aia8.2201$Ao.716653733@newssvr14.news.prodigy.com>


This is just fast and dirty. You can do a lot of stuff.

set serveroutput on size 1000000
declare
  cursor c_7 is
  select username, password, created from dba_users;   cursor c_8 is
  select username, password, created, lock_date, expiry_date from dba_users;   v_version number(1);
begin
  select to_number(substr(banner,instr(banner,'Release')+8,1))     into v_version
    from v$version
   where rownum = 1;
  if v_version = 7 then
    for l in c_7 loop
      dbms_output.put_line(l.username||' '||l.password||' '||l.created);     end loop;
  elsif v_version = 8 then
    for l in c_8 loop
      dbms_output.put_line(l.username||' '||l.password||' '||l.created||' '||l.lock_date||

                           ' '||l.expiry_date);
    end loop;
  end if;
end;
/

"Tom Breed" <t.breed_at_hccnet.nl> wrote in message news:a4c4nl$6o5$2_at_news.hccnet.nl...
> This is not what I want, my script should 'act different on another
> version'.
> I know how to check the version, but how make some kind of an 'if
> construction' ??
>
> if the version is 7.3 I would do this:
> select uername,password,created from dba_users;
> but if it was 8.1.7 I could do this:
> select username,password,lock_date,expiry_date from dba_users;
>
> Maybe someone already found a solution for this.....
>
> Tom
> t.breed_at_hccnet.nl
>
> "Ikarus" <luciver_at_zone.at> schreef in bericht
> news:aXfa8.614220$5G5.4426216_at_news.chello.at...
> > Or you can check the compatible Parameter from the v$parameters ?
> >
> >
>
>
>
>
Received on Tue Feb 12 2002 - 18:10:43 CST

Original text of this message

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