Hi Chris,

I used SharpDevelop years ago, forgot abot that.  I'd like to do it via the
script or in-DB because I want a set-and-forget solution I can run on a
scheduler.  I have stacks of other jobs to do - some actually similar to
this, but if I can just leave it to run and generate a daily report of the
back of it thats all I need for now.

The script generates a csv but I've also ammended it to insert into the DB
afterwards and just added a couple of difference collumns used_mb_diff and
free_mb_diff.  I know I could do this on the fly but space isn't a problem
and people here don't understand databases that well, so the easier I can
make it the better.  It takes around 8 minutes to run. It would be nice to
run an update onto the new collumns after that but I'm struggling with it.
I can do it in Excel quite easily but prefer this approach for many
reasons..

BTW - the browser is a portableapp, not the DB.

On Tue, Aug 22, 2017 at 9:53 AM, Chris Locke <sql...@chrisjlocke.co.uk>
wrote:

> > I prefer using the PortableApps SQLite browser for other things as you
> can have tabbed SQL queries but it doesn't have the DATETIME data type
>
> Date and Time *Datatype*. *SQLite* does not have a storage *class* set
> aside for storing dates and/or times. Instead, the built-in Date And Time
> Functions of *SQLite *are capable of storing dates and times as TEXT, REAL,
> or INTEGER values: TEXT as ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS").
>
> DB4S (DB Browser for SQLite - the 'real' name for SQLite Browser) will
> accept anything as a data type, not necessarily whats in the drop down
> list.
>
> Drop me an email - I can show you how to create an application in
> SharpDevelop using VB.Net if you required.  What you want could be
> accomplished with 'naked' SQLite, but a proper 'script' (or application)
> would give you much more control, reporting, etc, etc.
>
> PS: DB4S is on v3.10 now, so if you're using the 'portable version', it
> needs updating! ;)
>
>
> Thanks,
> Chris
>
>
> On Tue, Aug 22, 2017 at 9:32 AM, Matthew Halliday <fj1200...@gmail.com>
> wrote:
>
> > Hi Clemens - thanks for the reply.
> >
> > I'm trying to keep them a regular 4  or 6 hours - I'll see what works
> > best.  The script runs as a scheduled task.
> >
> > I used the SQLite Studio to create the table so used the DATETIME data
> type
> > for that, and although I used yyyy-mm-dd hh:mm:ss in the script it seems
> to
> > have reverted it to dd/mm/yy hh:mm:ss.   I prefer using the PortableApps
> > SQLite browser for other things as you can have tabbed SQL queries but it
> > doesn't have the DATETIME data type.  if I use "where date_time =
> > date('now','-1 day')"  for example, that seems to work ok.
> >
> > I have mailing list emails going back a few years to when I used to use
> > SQLite a lot but couldn't find anything in them for this.
> >
> > On Tue, Aug 22, 2017 at 9:20 AM, Clemens Ladisch <clem...@ladisch.de>
> > wrote:
> >
> > > Matthew Halliday wrote:
> > > > I have a simple import table: id, servername, drive, capacity,
> used_mb,
> > > > free_mb, free_pc (%) and a date_time field.
> > >
> > > What is the format of the values in the date_time field?
> > >
> > > Is there always a constant offset between two consecutive timestamps?
> > >
> > >
> > > Regards,
> > > Clemens
> > > _______________________________________________
> > > sqlite-users mailing list
> > > sqlite-users@mailinglists.sqlite.org
> > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> > >
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to