[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Database name variable?
Bob,
If you're using Oracle, there is a data dictionary table/view
called SYS.V_$DATABASE which contains a column called NAME.
Normally, only sys and system have access to this table.
You may have to grant access on sys.v_$database to the user
which runs the report.
If you're using sybase or some other rdbms, I'm not sure.
There may be a similar catalog table which contains what
you're looking for, I don't know. I had a similar problem
on a project using sybase, but I ended up taking a different
approach. If you come across a solution, let me know.
Ray
> I'm sorry, I meant to say you name the database such as 'EPDMO' or
> 'FSDMO'. I want to retrieve that name for some adhoc reports.
>
> Bob Smith
> Litton Enterprise Solutions
>
> > -----Original Message-----
> > From: Ray Ontko [SMTP:rayo@ONTKO.COM]
> > Sent: Sunday, November 30, 1997 10:57 AM
> > To: Multiple recipients of list SQR-USERS
> > Subject: Re: Database name variable?
> >
> > > There should be a variable holding the database name. What is this
> > > called? Does anyone have a list of variables that SCRiBE uses
> > besides
> > > the page of them in the SQR book?
> >
> > Bob Smith,
> >
> > I think $sqr-database is what you're loking for. This contains a
> > value like ORACLE, DB2, SYBASE, ODBC, etc. This is the name of the
> > RDBMS. This is also available as {sqr-database}.
> >
> > Hope this is what you're looking for.
> >
> > Ray
> > ----------------------------------------------------------------------
> > Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB"
> > rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/
>
----------------------------------------------------------------------
Ray Ontko | Ray Ontko & Co | "Time for a new signature line."
rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/