J
john.muscat
Hi all,
I have the below statement that basically looks in one table
(tblActive), gets the row number, and then inserts that and the name
into another table (tblpos).
I would like to modify it slightly so that its looks up the first table
at random. At the moment it seems to get it alphabetically.
Can this be done? I have tried doing an order by (lowercase) before the
")" but I can not figure out the correct syntax.
strSQL = "SELECT (select count(*)" & _
"from tblActive as c2 " & _
"where c2.Name < c1.Name)+1 AS RowNumber, c1.Name,
[RowNumber] AS Pos INTO tblpos2 " & _
"FROM tblActive AS c1 " & _
"ORDER BY c1.Name;"
Thanks in advance.
I have the below statement that basically looks in one table
(tblActive), gets the row number, and then inserts that and the name
into another table (tblpos).
I would like to modify it slightly so that its looks up the first table
at random. At the moment it seems to get it alphabetically.
Can this be done? I have tried doing an order by (lowercase) before the
")" but I can not figure out the correct syntax.
strSQL = "SELECT (select count(*)" & _
"from tblActive as c2 " & _
"where c2.Name < c1.Name)+1 AS RowNumber, c1.Name,
[RowNumber] AS Pos INTO tblpos2 " & _
"FROM tblActive AS c1 " & _
"ORDER BY c1.Name;"
Thanks in advance.