At 11:21 AM 4/11/02 -0400, Dan wrote:
>I appreciate everyones help. I will now learn how
>to create a view using code rather than the built
>in view designer. I see Dr.R has posted an example
>of this,and I am on my way to doing just such.
Dan,
Follow these steps to ENHANCE all existing VIEWS:
I'll use CONCOMP database as an example.
00. CONNECT Concomp IDENTIFIED BY NONE
01. UNLOAD the structure of existing VIEW
Example: (View - SalesInf)
OUT SalesInf.VIE
UNLOAD STRUCTURE FOR SalesInf
OUTP SCREEN
02. RBEdit SalesInf.VIE
SET QUOTES=NULL
SET QUOTES='
SET DELIMIT=NULL
SET DELIMIT=','
SET LINEEND=NULL
SET LINEEND='�'
SET SEMI=NULL
SET SEMI=';'
SET PLUS=NULL
SET PLUS='+'
SET SINGLE=NULL
SET SINGLE='_'
SET MANY=NULL
SET MANY='%'
SET IDQUOTES=NULL
SET IDQUOTES='`'
SET CURRENCY '$' PREF 2 B
DISCONNECT
SET STATICDB OFF
SET ROWLOCKS ON
SET FASTLOCK OFF
CREATE SCHEMA AUTHOR CONCOMP NONE
CREATE VIEW `Salesinf` +
(empid, xtransid, xtransdate, xnetamout) AS +
SELECT t2.empid,t2.transid,t2.transdate,t2.netamou+
nt FROM employee t1,transmaster t2 WHERE t2.empid +
= t1.empid
Modify above code to look like this:
SET ERROR MESS 677 OFF
DROP VIEW SalesInf
CREATE VIEW `SalesInf` AS SELECT +
t2.empid AS EmployeeNumber, +
t2.transid AS TransactionNumber, +
t2.transdate AS TransactionDate, +
t2.netamount AS TotalSalesAmount +
FROM Employee t1, TransMaster t2 +
WHERE t2.EmpID = t1.EmpID
COMMENT ON VIEW SalesInf IS 'Sales Data by Employee'
SET ERROR MESS 677 ON
03. RUN SalesInf.VIE
04. LIST VIEWS
05. BROWSE ALL FROM SalesInf
Now you have the enhanced version of the same view with
more detailed/descriptive column names along with COMMENT
for that VIEW.
06. Create any Report(s) based on this Enhanced VIEW and
everything will be treated like a normal table with
normal columns, etc.
There you have it!
Enjoy and make sure to have fun.
The Magical R:BASE 7.0 for Windows includes a COOL
Query Builder/Designer and Query Editor!
Take a look at: http://www.rbase.com/rbg7
Very Best Regards,
Razzak.
===================================-============================
Official R:BASE List Server: mailto:[EMAIL PROTECTED]
RBTI Events/Training: http://www.rbase.com/events
R:DCC Members: http://www.rbase.com/rdcc
Developers' Conference 2002: http://www.rbase.com/conference
================================================================
R:BASE, Oterro & R:Tango are registered trademarks of RBTI.
==================================-=============================
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/