Sorry David. Yes, you're the David and the book is your 'Advanced SQL Queries' book!
I'll try your approach. I do name all my views v_something and my temporary tables t_something to keep them straight in my mind which gets harder to do with each passing day. <g> Thanks a lot :) -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of David M. Blocker Sent: Friday, January 28, 2005 11:54 AM To: RBG7-L Mailing List Subject: [RBG7-L] - Re: Temporary Views Claudine Is the David in your email me? And does page 67 refer to a book? Anyway, jumping in on this one, it does fit it with what Tom was writing about originally. Another approach would be this: AT reporting time: CREATE Temporay VIEW zRepView (Billing_ID,Tot_Billing_Amt) AS SELECT SELECT t40.billing_id, SUM(t40.billing_amt) FROM d_b_allocation t40 GROUP BY t40.billing_id WHERE da_invoice_dt = .vdate and then base the report on this view. OR, if that seems unstable, follow the above with this step PROJECT Temporary zRepTable USING ALL FROM zRepView I use the the "z" naming convention for all temp tables and views, and for development, I'll have files to create the temp view/tables (eg. include above commands in file named ZREPVIEW.TMP which I can just run to work on the report in the designer). David Blocker [EMAIL PROTECTED] 781-784-1919 Fax: 781-784-1860 Cell: 339-206-0261 ----- Original Message ----- From: "claudinerobbins" <[EMAIL PROTECTED]> To: "RBG7-L Mailing List" <[email protected]> Sent: Thursday, January 27, 2005 7:40 PM Subject: [RBG7-L] - Re: Temporary Views > Speaking of views, I have a slight problem with the following: > > SELECT t40.billing_id, SUM(t40.billing_amt) FROM d_b_allocation t40 + > GROUP BY t40.billing_id > > Works fine but I want to do this only for selected records in the table > > where da_invoice_dt = .vdate > > I've tried putting a where clause or a having clause in different places to > no avail. > > What am I missing? > > TIA, Claudine :) > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Albert Berry > Sent: Thursday, January 27, 2005 6:18 PM > To: RBG7-L Mailing List > Subject: [RBG7-L] - Re: Temporary Views > > 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. > > > > --- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Happy almost weekend!!! > > > > I have a quick question regarding the advantages and/or disadvantages of > using create temporary > > view as opposed to the regular create view commmand? > > > > Thank you... > > > > Tom Eldred > > > > > > > > > > > > > > ________________________________________________________________ > > Sent via the WebMail system at localroads.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] > >
