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

read entries across a table instead of down

Status
Not open for further replies.

awhitsel

Programmer
Feb 22, 2001
80
US
I have a table with two fields. The first field is a "record number" and the second field is a separate "catalog number".

I want to be able to view the items from the second field across so that they are in a separate field, so that there is a unique "record number" in each record with the "catalog numbers" read from left to right.

If you don't understand what I'm asking about, look below:

My records currently look like this:

REC_NUM CAT_NUM
----------- -----------
1 1
1 2
1 3
2 4
2 5
2 6

I want to be able to read my table like this:

REC_NUM CAT_NUM1 CAT_NUM2 CAT_NUM3
----------- ------------- ------------- -------------
1 1 2 3
2 4 5 6

Any help would be greatly appreciated.

Thanks.
 
Let me revise my exmaple:

My records currently look like this:

REC_NUM CAT_NUM
----------- -----------
1 1
1 2
2 3
2 4
2 5
3 6
4 7
4 8

I want to be able to read my table like this:

REC_NUM CAT_NUM1 CAT_NUM2 CAT_NUM3
----------- ------------- ------------- -------------
1 1 2
2 3 4 5
3 6
4 7 8

Once again, any help would be greatly appreciated.

Thank you.
 
look into crosstab query. I posted an example approximating this just today in one of the Ms. A. fora, so just search for the word "Crosstab" and limit the search to ttoday (or some quite recent interval). It "SHOULD" be returned in the results ...

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
I am getting an error while trying to view the crosstab query results:

Too many crosstab column headers (79847) with OK and Help buttons.

There is no help file for this error message on my system.
 
do you ACTUALLY have 79847 CAT_NUMN values?

If so then Crrosstab is not going to help. The again if there are that many 'categoties' they won't fit across an 'output object' properly anyway so the entire exercise is rather pointless.

On the other hand, if there are not SO many columns to generate, then there must be some other eror.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top