Challenging Update Query needed

B

Bikini Browser

I need an update query written. Are there any takers? It looks hard, but I
don't think an experienced query writer will have any problems with it.. Am
I wrong? I will be happy to send some money to the taker for this query via
PayPal. Please help me.



The goal here is to be able to sort out local numbers from long distance
numbers and write out a new table for each one, overwriting any existing
tables.



Please observe the architecture below...




Tablename "Prefixes" has four columns.



1 2 3
4

Column Names: "Zone" "City" "Prefix"
"Type"



Only fields I need to look at is the "Prefix" field and the "Type" Field.



The value of "Type" is either "Local" or "Isla" "Local" are Local Calls
and "Isla" are long distance.



Table name Posted_Listings has several columns but all I care about is the
column that is labeled says "FaxNumber".



I need an update query written that will look into the Prefixes table (the
Prefix column) and match the first 7 Charaters in Posted Listings Table (The
FaxNumber column)



Example: If the prefix is 787-722 in Prefixes table (the Prefix column) and
the fax number is 787-722-9846 in Posted Listings Table (The FaxNumber
column) it will be a match.



If you find a match, then look into the Prefixes table (the "Type" column)
and write the entire record from Posted_Listings to a new table called
LocalFaxNumbers.



The same for Long distance numbers, or Type "Isla" numbers. The table name
will be IslaFaxnumbers. However, if the Type is ISLA, then insert a "1-" in
front of the number for I IslaFaxnumbers, table "FaxNumber" Field.



There will be some cases that the prefix dos not match. Then (almost done)
if you find a prefix number in the "FaxNumber" column of the Posted_Listings
table that does not match any of the prefixes, in the Prefixes table, in the
Prefix Column, then write that record to the new table too.



Finally, if there is a way, I would like the query to count 2000 records
from each new table, and write new tables for them.



So I end up with tables like this.

Localfax1

Localfax2

Localfax3

Localfax4

Localfax5

Localfax6

And so on until all the records are written out from the table
LocalFaxNumbers.



The same for Isla Fax numbers.

Islafax1

Islafax2

Islafax3.

How do you do that?



I am guessing that this request will have to be split into several steps.
Am I right?



Do you have questions? Please write back soon.



Thanks


Dale
 
J

John Vinson

I need an update query written. Are there any takers?

Yes. Answered in your other thread.

Please have a little bit of patience. Reposting in under an hour is
not necessary. Everyone who answers here is an unpaid volunteer; the
service is free; instant responses do happen but they're not the norm.

John W. Vinson[MVP]
 
C

Chris2

John Vinson said:
Yes. Answered in your other thread.

Please have a little bit of patience. Reposting in under an hour is
not necessary. Everyone who answers here is an unpaid volunteer; the
service is free; instant responses do happen but they're not the norm.

John W. Vinson[MVP]

Bikini Browser,

Just to go further with Mr. Vinson's comments, it takes roughly one
hour before your post appears in my newsreader, and may take that
long before any answer (from anyone) appears back in your
newsreader. (Or it may take longer.)


Sincerely,

Chris O.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top