Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
Views?? |
Sat, Jun 30 2018 4:49 AM | Permanent Link |
Ian Branch | Hi Team,
Thought I would create a view that was a subset of a LineItems and add a couple of calculated fields. So, I did the following.. Added a calculated field to LineItems. QtyUsed * SellPrice Then ran the following. {sql} CREATE VIEW "vLineItems" as select * from Lineitems {sql} It created the vLineItems OK. I then went and deleted the calculated field from LineItems. Surprise! The calculated field disappeared from the View. Ummm. What the?? This is not my experience with Views.. What have I done is obviously wrong so how do I get the calculated field into the view? Regards & TIA, Ian |
Sat, Jun 30 2018 9:12 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
I don't have much (any) use for views so my knowledge is very limited. Having said that a view is basically a query and its done exactly what you asked it to do - show all columns in LineItems. If you want it to show a calculated column either leave the column in LineItems or spwcifically add it into vLineItems eg {sql} CREATE VIEW "vLineItems" as select *, QtyUsed * SellPrice AS Sales from Lineitems {sql} If you'd created a subset of columns, naming those you wanted, I suspect that you'd have received an error message. Roy Lambert |
Sat, Jun 30 2018 6:48 PM | Permanent Link |
Ian Branch | Hi Roy,
I have used them on the odd occaision in the past. Particularly for reports. I have found them useful for create "tables" that are used by reports as they don't physically exist aside from in the Catalog and can contain much of the stuff you might be trying to do in the reports. e.g. qtyused * SellPrice. Let the Database do the work rather than the Report. Regards, Ian |
Sun, Jul 1 2018 2:39 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
I've either used in-memory tabes, or more likely a mindset that says keep it in the report I can see what's happening if I need to look at the report The extra time taken by comparison with formatting and printing is nowt I generally find its easier to spot I put the decimal point in the wrong place doing it that way YMMV Roy Lambert |
Fri, Jul 6 2018 3:00 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ian,
<< I then went and deleted the calculated field from LineItems. Surprise! The calculated field disappeared from the View. >> I assume that you mean "computed" or "generated" when you say "calculated" ? If you drop a column from the underlying table, then EDB will allow adjust the view accordingly. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |