On Thursday 20 May 2010 08:28:42 am Carey Gagnon wrote:
> > Not well known but Sqlite has some internal functions that duplicate what
> > you
> > are doing above. Might save you some troublee:
> > http://sqlite.org/lang_datefunc.html
> >
> > Thanks again Adrian. I've already managed it as was shown in the previous
>
> email, but I will investing gate for the future.
>
> As far as the create view goes, from my reading, I'm not sure I can use it
> as the Records table has no field "duration". It is a virtual field in
> dabo. Unless of course I can substute the table in the from clause (from
> Records) with dataset (from dataset)
>
> All great pointers folks.
>
> It's all greatly appreciated.
>
> Carey
Carey,
A SQL View is a virtual table, which is based on SQL SELECT query. Which
means that you create the fields in the table from the sql statement. For
example if you wanted the difference between two fields you would write
something like:
create view mytestview as
select (thefirstfield - thesecondfield) as differencefield, firstdate,
seconddate from mytable
Now you can use the view just like you would a regular table and the
field "differencefield" would be available. Your bizobj class would have
something like self.addField("differencefield")
Johnf
Johnf
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]