----- Ursprungligt Meddelande -----Från: Mark Miesfeld <firstname.lastname@example.org>Kopia:Datum: torsdag, 01 november 2012 18:25Ämne: Re: [Oorexx-users] ooSQLite and OO_STEM_OF_STEMSOn Thu, Nov 1, 2012 at 9:30 AM, hakan <email@example.com> wrote:It's possible to use column names with embeded space, I believe any char is allowed.
the case with makearray I had in mind was like this. But that's how makearray works.Hi,I'm too dense to understand these more complicated things.In the below you use: [My Column] is that SQL syntax for a column name with spaces in it? Or, I suppose, it is to use  indexing for the stem?
/* rexx */
tbl = .oosqliteconnection~new("mytest2.db",,.ooSQLite~OO_STEM_OF_STEMS)
sql = "CREATE TABLE TBL (A,B, 'My Column')"
sql = "INSERT INTO TBL VALUES('A1','B1','My Col1');"
sql = "INSERT INTO TBL VALUES('A2','B2','My Col2');"
sql = "INSERT INTO TBL VALUES('A3','B3','My col3');"
tblcols = .array~of('[My Column]','B','A')
rows. =tbl~exec("SELECT "tblcols~makestring('L',',') "FROM TBL;",.TRUE)do x = 1 to rows.0mycols = rows.x~makearray -- give me column names, order will not match select order aboveBut, isn't true that any time you use a directory or a stem, you would have to know the order in your select statement to know what order the columns should be in?This is why I originally implemented the format now called OO_ARRAY_OF_ARRAYS. Because the array at  gives the column names in the order of the select statement, (and the column names are in the case that the SELECT statement returns them in.)With the OO_CLASSIC_STEM format, I could code this:tblcols = .array~of('[My Column]','B','A')say 'SQL is:' "SELECT "tblcols~makestring('L',',') "FROM TBL;"rows. =tbl~exec("SELECT "tblcols~makestring('L',',') "FROM TBL;",.TRUE)say 'count:' rows.0colName = "MY COLUMN"do x = 1 to rows.0say rows.x.colName rows.x.B rows.x.Aendand get this:SQL is: SELECT [My Column],B,A FROM TBL;count: 3My Col1 B1 A1My Col2 B2 A2My col3 B3 A3So it seems to me that [My Column] is SQL syntax for using a column name with a space in it?Plus, as I said, the only reason the columns are in order is that I know the order the select statement uses.Maybe there is some other point you are bringing up here that I don't see.--Mark Miesfeld