Search and Update - Difficult update query

mac_see

Active Member
Joined
Oct 15, 2002
Messages
419
I have 162 tables in my database. Names of the Tables are 1, 2, ...... so on
till 162. Every table has only one field (field name = Expr2) of type NUMBER
(DOUBLE) with 352716 records in each table.

I have one more table with 163 fields. Name of the table is "Verify" which
has 701 records. First field (field name="Main" of data type "BYTE") of
Verify has serial numbers from 55 to 755. Names of the rest of the fields are
1, 2, 3, ..... so on till 162. All these remaining fields (except "Main") are
blank and are of NUMBER (INTEGER) type.

Here is what I want:

The Query/SQL should look the first record (number 55) from the "Main" field
of "Verify" table in first field (Expr2) of the first table (1) and then
update field 1 (field name = 1) of verify with the count (number of times the
number 55 appeared in table 1) continue this till 701 records.

Continue the same thing with all the remaining fields till 162


1 2 3 4 5 .... 162 <=Table names
Expr2 Expr2 Expr2 Expr2 Expr2 Expr2 <=Field name
1 1 1 1 1 1 <=Records
2 2 2 2 2 2
. . . . . .
. . . . . .
. . . . . .
352716 352716 352716 352716 352716 352716 <=EOF

(These 352716 records per field per table are random numbers from 55 to 755)

Verify <=Table name
Main 1 2 3 .... 162 <=Field names
55 _ _ _ _
56 _ _ _ _
57 _ _ _ _
. _ _ _ _
. _ _ _ _
. _ _ _ _
755 _ _ _ _


Not sure if I have explained the scenario properly. Please help...

Thanx
Maxi
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Somehow the font is not working for this post.

Please view the later half of my post in courier new font. I have kind of explained my scenario in a text-pictorial representation.

Maxi
 
Upvote 0

Forum statistics

Threads
1,221,849
Messages
6,162,425
Members
451,765
Latest member
craigvan888

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top