Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

denormalize table

denormalize table

denormalize table

We have a table like this:

002A    ASMAP
002A    ASMAT
007A    ERARP
007A    FRME2

We want to denormalize it like this:

007A    ERARP, FRME2

I used to be able to do this stuff, but I haven't worked in Pdox for quite a while.


RE: denormalize table

Query won't do it by itself.

Create a new table.  One field for the 'unique' values.  A4, looks like.


:alias:table.db  | quad                          |
                 | check calc count all as nquad |


Index the 'newtable.db' on 'quad' (first field).  This is so you can use qlocate instead of locate[next].

Take the highest count, multiply * 5 (number of units + 1 for comma).  This will be the size of the new field in the new table.

Use 2 tcursors, one opened on 'quadflds.db', one on new table.  Note that you MUST at least attempt the unlockrecord.  Otherwise, you may well end up with really messed up records in the new table you just created.


scan tcO :
  if tcT.qlocate(tcO."quad") then
    ; errorhandling

Haven't tested, so may contain errors.  Hopefully you get the idea, at least.

Tony McGuire
Stop Rob Bennett - http://www.notrob.info
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: denormalize table

Thanks! That works.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close