Mark Stanton wrote:
Keys are intended for the internal workings of the database, they are not meant to be
used like this.
What you want is the WHERE clause, or occasionally the HAVING clause, matching or
excluding rows based on their data.
Keys are NOT data and should not be used as such.
Regards Mark Stanton One small step for mankind...
I have a table, Reading, that contains three fields: ID, Date, and Meter. Date is the
date the meter is read, and Meter is the meter reading.
I want to know how much electricity (KWH used) I have used each month. The query
below will provide that information:
SELECT "Ending"."Date", "Ending"."Meter" -"Beginning"."Meter" AS "KWH Used" FROM "Power".
"Reading" AS "Beginning" LEFT JOIN "Power". "Reading" AS" Ending" ON "Ending"."ID" =1 +
"Beginning"."ID"
Perhaps you are right about keys being intended for the internal workings of the
database. While I don't have an example of one key being the multiple of the other key, it
is possible. It just might not have any practical applications.
--Dan
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.