[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Database Name



Fernando,

If you are using an ORACLE database there is a SYS user table that
contains the instance of the DB that you are attached to.  It is
SYS.GLOBAL_NAME.  It contains one column called GLOBAL_NAME and there is
one record in the table that contains the DB instance.

Example code:
BEGIN-SELECT
GLOBAL_NAME  &DB_INST

from SYS.GLOBAL_NAME
END-SELECT

I hope you are using ORACLE so that this helps.

Joe Lodewyck
Certified MITI SQR Instructor
Arris Technical Services
Phoenix, AZ
Email:  jlody@arristech.com
 ----------
From: "Fernando Villaamil
To: Multiple recipients of list SQR-USERS
Subject: Database Name
Date: Friday, November 15, 1996 8:14AM

Does anyone know how to print the name of the database referenced in the
USE
statement on a report?  I don't see a predefined variable for SQR that
has
this information.  SInce we have both a Test and a Production Database
defined to the system I would like to denote the database that was used
in
the reports to ensure there is no confusion when a printout is
referenced by
a user.

Fernando A. Villaamil
Miami Herald Publishing Company
fvillaamil@aol.com