Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query with sequential data

Status
Not open for further replies.

kb178

IS-IT--Management
Aug 16, 2001
83
0
0
US
I have a table of names and a table of certificate numbers. How can I sort the table of names by last name and update their certificate field with a certificate number from another table? The certificate numbers need to be appended in their id order to the sorted list of names.

Thanks,
Kristen
 
What are the common link fields between the two tables. Is there an ID field that we can use to link them together?

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
There is no common link between the two tables. Basically, if I have a table with Jim, Bob, and John and another table with ABC123, ABC456, ABC321, I want to assign the certificate #s in the order that the are in to the names in alpha order. With the example data above, this is the outcome I would want in one table:

Name Cert#
Bob ABC123
Jim ABC456
John ABC3211
 
hmm, not really a good idea to do it this way, but if you really want then you could probably do something like:

INSERT INTO tblNames(cert) (SELECT cert FROM tblCert ORDER BY cert)

make sure you've sorted tblNames by name first though...

Crowley - as in like a Crow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top