Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

Re: Re: Accessing previous record from current record

Integrated Application Platform › Forums › General › Accessing previous record from current record › Re: Re: Accessing previous record from current record

November 30, 2012 at 4:51 pm #950
amckinlay
Keymaster

1) You can get the previous record with something like:

prev = QueryLast("mytable where date < " $ Display(currrent_date) $ " sort date")

Note: "previous" only makes sense when you specify a sort, otherwise Suneido doesn't guarantee any particular order.

If you wanted to get multiple previous records you could use the same query and read Prev multiple times.

2) I would leave it as a calculated column unless speed becomes a problem.

3) see (1)

4) if the data is small enough (e.g. less than 10,000 records) then it may be easier to read the data into memory and work with it there. Then you do not need to do queries to get previous records.

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language