Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Tue, Jan 3, 2012 at 3:10 AM, Andreas Säger <villeroy@t-online.de> wrote:
Any resource on plain SQL can give you the solution.  Base can not help you
by any means to compose any non-trivial query. Once you have a working query
against your database you build your report based on that query.
Most likely the query will include the GROUP BY statement and 2 instances of
your table to get the difference value.


Thank you I was hoping there might be a way in base to help me out
with my query.

since I only take one record per day I can get a good proximity of my
report data with something like so

SELECT  `date`, `modifiedprintusage`.* FROM `modifiedprintusage` WHERE
`date` > NOW( ) - 48 * 3600 ORDER BY `ip` ASC

maybe group by where ip like 192.168.[this octet].[not this octet]
Maybe sql just can't do it.

Issues I am having that are BASE related the above SQL works ok in
BASE with 2 exceptions in design view.
1.) it complains about the (-48*3600) I have to remove this and re add
it in sql view.
2.) it puts an `ip`.`modifiedprintusage` after `modifiedprintusage`.*
and will not let me hide the order by field; again I have to edit it
in sql view to remove it.

BASE also has an issue displaying all the fields even though I gave it
* it skips the first field which in this case is date. In mysql the
above sql show the date twice.

also it always puts the table name back in on all the fields this is
ok put ugly looking.

I'm using the odbc connector for mysql.
I found it impossible working with tables that don't have primary keys
in base. You can't create an entry form that works. I found it
impossible though base to add the primary key to an existing table.
Since I only have one entry a day for my printers I used date and
serial together as a primary key I wonder if that has anything to do
with it not printing the date if I only use * in my select statement.
But like I said in mysql itself it shows it with just *.


Mysql is guilty of the other flaws like time not being in seconds.
I have to try and find what it is using I get no records with the
above sql I needed to multiply the subtracted by 60 or so to get
results but I'll figure that out latter.

--
View this message in context: 
http://nabble.documentfoundation.org/Base-SQL-help-tp3627698p3628654.html
Sent from the Users mailing list archive at Nabble.com.

--
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


-- 
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.