I have a table, below, where each record has 3 distinct values between 1 and 9.
ID v1 v2 v3
---------------------
1 1 6 2
2 4 8 1
3 3 5 4
4 3 8 5
5 8 7 9
6 etc...
I want to identify all sets of three IDs that...
hello to all
I'm VERY new at VBS. The following code gets the names of all the .mdb files in a specified folder, then
writes these names to a file called TEST3.txt. It works perfectly.
What I want to do instead is write the mdb file names to an ACCESS table. (in TEST4.mdb, table...
Consider table tblA to the left. Each ID has rows 1 to 6. For each ID, the 6 values of
valx and valy form 3 matching pairs, each written both 'forwards' and 'backwards'.
For ID = 91, the three matching pairs are (24, 19), (18, 20), (21, 16).
I want to get output like the table tblB...
thanks, Skip
I'm away for a few days, but I'll give this a try when I'm back. It looks very hopeful!
Do you have any reason to think that running my code from an external ADO program would be faster than running the my code from VBS?
Thanks, teach314
hi Skip - yes, I could do x number of loops in VBA, then compact. But, the VBA code is part of a math research study and runs for about 30 hours on average. So that I can run it through the night, I use VBScript to open Access then stop it after a designated number of iterations. This takes...
hi Skip - I'd like to follow up on your earlier response.
I'm quite unfamiliar with ADO, but am willing to learn if it will help.
Are you suggesting that if I run my code using ADO instead of DAO, that I can somehow periodically step out of the code to do a Compact???
Or, are you saying that I...
hi to all.
I'm quite new to VBS, but I could use some help.
I have a table in an Access mdb like this...
X Type
--------
11 234
14 7
22 98
23 118
36 47
etc...
I want to step through each X value then do an analysis based on the Type value. In VBA, I would just set up a...
I have a table like this...
Field ID is autonumber and pk. Field X is Long.
ID X
--------------------------
1 1,271,234,567
2 2,035,222,123
3 1,997,276,330
4
5 2,009.776,197
...etc
The values of X are very large and, on...
found a solution...
SELECT
t1.ID, t1.rank, t1.X, Sum(t2.X) AS Y
FROM
Tbl_TEST AS t1
INNER JOIN
Tbl_TEST AS t2
ON
(t1.ID = t2.ID) AND
(t1.rank <= t2.rank)
GROUP BY
t1.ID, t1.rank, t1.X;
hi to all
I have a table as shown below. Every ID has ranks 1 to 4.
ID rank X Y
-------------------------
24 1 4
24 2 0
24 3 3
24 4 6
25 1 0
25 2 0
25 3 8
25 4 2
26 1 etc...
Within each ID value, I want...
hi to all
I have a table like this...
The PK is Type & Rank. SubType is either 1 or 2 (ASC). x holds single-character string values.
Type Rank SubType x
=================================
100 1 1 2
100 2 1 4
100 3 2...
hi
I have a table that has 8 records...
tbl_1
X Rnk
2 1
2 2
3 1
3 2
4 1
4 2
5 1
5 2
I need to find ALL ways to permute these 8 records in a column subject to the following contraints...
(2,1) precedes (2,2), (3,1) precedes (3,2), (4,1) precedes (4,2)...
hi Duane - your solution to this problem worked perfectly. But, for my own learning, I have a question.
You used the following SQL...
SELECT ID2, CountConsec("tblTeach314b","ID2",[ID2],"Val") AS CountIt
FROM tblTeach314b
GROUP BY ID2, CountConsec("tblTeach314b","ID2",[ID2],"Val");
You used...
Thanks for a great solution!
I was able to produce the same output, but in a slower and much more round-about way. I INNER JOINED my table to a copy of itself that was offset by 1 row, took ABS of the differences in the Val values from each component table, used code to introduce a Rank field...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.