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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!! Convert Column to row

Status
Not open for further replies.

dj982020

Programmer
Jun 11, 2004
27
US
I have imported an Excel worksheet to Access, and the formatting is really bad. I need a query that converts a table that looks like this:

FIELD1
ID
1234
NAME
John Doe
PHONE
555-1212

To a table that looks like this:

ID NAME PHONE
1234 John Doe 555-1212
 
Are there always the same number of "rows" per "record"? Is the data consistently an "odd numbered" row that has a column heading followed by an "even numbered" row that has a data value?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Yes, there are always the same number of "rows" per "record". There are random empty rows so there is no consistency as far as odd or even number rows containing data. There is, however, an Autonumber assigned to each row (i.e. every name field has ID=6).
 
Why not do the xpose in Excel (which has a built in function for that) and then do the import?




MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top