Interesting discussion about where INSERTed rows are placed in a SQL table! I
have often noticed that there is no natural order in R:BASE, because when
opening a table, new rows have been shown at the end of the table in spite of
them been given a primary Key number in the middle of the index.

There have been times when I have wished to have the rows shown in a Primary Key
(index) order without using the ORDER OF parameter (even if this is very easy
today by just clicking at the top of the column!). I have then been using the
PROJECT command at the R>prompt in order to make a copy of the table using the
ORDER OF parameter (R>PROJECT newtable FROM table USING * ORDER OF primaryindex
ASC).

Then I delete the old table followed by renaming the new table etc. Constraints
might be necessary to take away before dropping (deleting) the old table and the
Table Description has to be renewed in the newtable. And I never do this (or
anything!) without a backup of the entire database!

This works fine but if SQL datasets by definition have no natural order, as
Larry writes, what happens in R:BASE when I use the ORDER OF parameter? I’m just
curious!

Bo Franzén
Department of Economic History
Stockholm University

On 2008-10-30, at 21:56, Lawrence Lustig wrote:
> Just had always assumed you could insert a row in the 
> middle of the dataset. Kind of like altering the table you 
> can insert a column at a given position. 
> SQL datasets by definition have no natural order.  Therefore, the idea of
inserting into the "middle" or even at the end of a table is meaningless.  Don't
count on any SQL database giving you back your data in any particular order
(such as order entered) unless you specifically request that order using ORDER
BY.  R:Base _generally_ gives you data back in as-entered order, but not always.
 Other systems _never_ give you data back in as-entered order -- they often
default to ordering by primary key value.
> --
> Larry

--- RBASE-L
=======================3D=======================3
D=
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
=======================3D=======================3
D=
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
=======================3D=======================3
D=
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
=======================3D=======================3
D=
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
=======================3D=======================3
D=


Reply via email to