If you use temporary tables, you don't need the view; just populate the temp tables. I use a temp view to combine/select rows from one or more permanent tables for a report. There is no great difficulty creating the temp view in the command file.
SELECT COUNT(*) INTO vCount FROM SYS_TABLES + WHERE sys_table_name = '<name of temp view>' IF vCount > 0 then DROP VIEW <name of temp view> ENDIF CREATE TEMP VIEW ... --- Thompson Technology Consultants <[EMAIL PROTECTED]> wrote: > > on 1/27/05 Albert Berry wrote... > > > > The advantage of the temporary view is particularly noticeable when > views > > > are used for reporting, > > > and more than one user needs a slightly modified view from another user > > who > > > is reporting at the > > > same time, but needing a different data set returned. The temporary view > > is > > > only visible for the > > > user who created it, and lasts only for the session. > > > Will a permanent view based upon temporary tables work the same way and > thus avoid having to create them repeatedly? I.E. The temporary tables are > user specific and thus controls the data set and should only be available to > the individual user. Is my understanding correct that with a permanent view > based upon temporary tables, two simultaneous users see data completely > independent of each other? > > Is there reasons not to use a permanent view based upon temporary tables > if the view is used consistently and the only difference is the data set in > which > the temporary tables take care of? > > Is not a view simply a stored select command and thus the only real difference > is whether you need to dynamically create it or store it for repetitive use? > > Not a current problem, just attempting to have a better understanding so I > can program more efficiently, with less overhead and trying to avoid pitfalls. > > Thanks, > -Bob > > Thompson Technology Consultants > 276 Chippewa > LaPorte, IN 46350 > 219-324-2605 (Phone & Fax) > 219-363-7441 (Cell) > http://ttc.inc.home.comcast.net > > ===== Albert Berry Management Consultant RR2 - 1252 Ponderosa Drive Sparwood BC, V0B 2G2 Canada (250) 425-5806 (250) 425-7259 (708) 575-3952 (fax) [EMAIL PROTECTED]
