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

Single Record to Multiple Records?

Status
Not open for further replies.

KARR

IS-IT--Management
Apr 17, 2003
91
CA
All,

Is it possible to break a single record into many records within a single table?

For example,

AcctNumb Note1 Note2 Note3 Note4
1234 xxxxx yyyyy zzzzz vvvvv
1235 xxxxx yyyyy zzzzz vvvvv

So it would look like:

1234 xxxxx
1234 yyyyy
1234 zzzzz
1234 vvvvv
1235 xxxxx
1235 yyyyy
1235 zzzzz
1235 vvvvv

Thanks

Rob
 
You can use a UNION query
[blue][tt]
(Select AcctNumb, 1 As NoteNumber, Note1 As [Note])

UNION ALL

(Select AcctNumb, 2 , Note2 )

UNION ALL

(Select AcctNumb, 3 , Note3 )

etc.
[/tt][/blue]
You may need to make the primary key "AcctNumb, NoteNumber" if it is currently just "AcctNumb".
 
I think that will do it, I will try it out.

Thanks

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top