exporting data into two different columns

  • Thread starter Thread starter LisaK
  • Start date Start date
L

LisaK

I have a query that has several procedure codes listed for 1 claim number. I
want to create a table where each claim is listed once and each procedure in
its own column. Can someone help me figure out an easy way to do this.

Thanks.
 
The term "procedure" may mean something different to you than it does to
folks here who put together expressions in code (AKA "procedures"). What do
you mean by it?

Remember, we're not there ... you may need to fill us in a bit more on what
you're working with/on...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Apparently your query is returning multiple rows for each claim number and you
want to put that data into a table with a field structure that is like

Claim Number, ProcedureCode1, ProcedureCode2, ProcedureCode3, ProcedureCode4,
..., ProcedureCode[MaxNumberOfCodes]

That is a bad design for a table. Can you explain why you need to do this?
There may be a better way to solve your need.

I can't think of an easy way to do exactly what you asked for. You would need
some complex ranking queries or perhaps a crosstab query if you wanted to
solve this with SQL. You could also solve this with a VBA procedure.

It would help a bit if you could type out a line that shows the desired
result. Something like the following where the first column is the claim
number and the following columns are the procedure codes.
a123 C20 A40 R22 T11
B567 X12 R22 G40 M8b

If this is for a report, you might be happy with a list of all the procedure
codes in one column and the codes separated by a space or colon or semi-colon
or other separator.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top