database 'selects' - newbie 14 (OpenInsight 32-bit Specific)
At 26 APR 2010 02:19:33PM ronald brown wrote:
Hi All,
newbie question # 1
I'm a newbie to OI. Just purchased OI 9.1 and have some questions that I generated going thru documentation, the website and just trying some things.
I will post each as a new topic, so that they can be treated individually.
TIA for helping with your ideas, suggestions and comments.
Running OI 9.1, on a win xp client. The server is a windows 2000 server box, running Unidata, and an application called Manage 2000.
In my current environment, I can build select statements in a basic program, such as the following, execute them, then use readnext to process the final result…
stmt=SSELECT CM WITH City=Buffalo" AND Amt_Due ] "10000" BY Last_Name'. The result is a sorted list that I iterate thur using READNEXT.
In the BASIC+ documentation, I see 'select' and 'select by', but these appear to select the entire table, which then needs to be processed thru READNEXT.
Is there a way to select the data from a program, then only process the much shorter list as the result?
thanx,
ron
At 26 APR 2010 03:06PM DSig (SigSolutions) wrote:
We don't "execute" but we have RLIST(). Look in the programmers reference for RLIST. You can create a select list, create active list etc with it … passing a string like you note
At 26 APR 2010 04:41PM ronald brown wrote:
Thanx again for your help.
I thought, from the very old days of Revelation G, that RLIST was solely for producing a report. I'll have to bring myself up to date on that command.
thanx,
ron
At 04 MAY 2010 03:58AM John Godfrey wrote:
e.g. Job=SELECT LOADS WITH DATE ]= ":QUOTE(From):" AND WITH DATE ⇐ ":QUOTE(To):' '
Rlist(Job,5,
,
,'')Hope this helps
At 04 MAY 2010 09:25AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Sorry for the pedantry but thus is a classic performance mistake when using indexes. Use BETWEEN otherwise the system will select all those dates ]= then all those dates The Sprezzatura Group[/url]
World leaders in all things RevSoft
At 04 MAY 2010 02:22PM ronald brown wrote:
Thanx for your suggestions and the 'hint' concerning 'BETWEEN'.
I have been playing with the syntax, and some of it is coming back from the 'old days' of Rev G.
ron