From: Eva on
Hi
I have a number of columns in the query and I created one column called data
from and I would like to put those headings to rows. How to do it?
Example
Cost C Cost D Data From
1122 Cost C
1122 Cost D

Can you advise how to do it?
--


Greatly appreciated

Eva
From: Steve on
Usually you do something like this in labels on the form or report which
uses your query as a recordsource. Please explain why you want to do this in
your query.

Steve
santus(a)penn.com


"Eva" <Eva(a)discussions.microsoft.com> wrote in message
news:40EBA712-466B-4379-A4FB-93F2595FE043(a)microsoft.com...
> Hi
> I have a number of columns in the query and I created one column called
> data
> from and I would like to put those headings to rows. How to do it?
> Example
> Cost C Cost D Data From
> 1122 Cost C
> 1122 Cost D
>
> Can you advise how to do it?
> --
>
>
> Greatly appreciated
>
> Eva


From: Jeff Boyce on
I'm not exactly clear on what you are trying to do...

If you are trying to "flip" the rows for the columns, one approach would be
to export what you have to Excel and use the Transpose function there.

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
"Eva" <Eva(a)discussions.microsoft.com> wrote in message
news:40EBA712-466B-4379-A4FB-93F2595FE043(a)microsoft.com...
> Hi
> I have a number of columns in the query and I created one column called
> data
> from and I would like to put those headings to rows. How to do it?
> Example
> Cost C Cost D Data From
> 1122 Cost C
> 1122 Cost D
>
> Can you advise how to do it?
> --
>
>
> Greatly appreciated
>
> Eva


From: KARL DEWEY on
Thats why you should not have data in a spreadsheet fashion.

Try this --
SELECT [Cost C], [Cost D], IIF([Cost C] Is Not Null, "Cost C", "Cost D") AS
[Data From]
FROM YourTable
WHERE [Cost C] Is Not Null AND [Cost D] Is Not Null;

What will you do if both have data?


--
Build a little, test a little.


"Eva" wrote:

> Hi
> I have a number of columns in the query and I created one column called data
> from and I would like to put those headings to rows. How to do it?
> Example
> Cost C Cost D Data From
> 1122 Cost C
> 1122 Cost D
>
> Can you advise how to do it?
> --
>
>
> Greatly appreciated
>
> Eva
From: Eva on
Hi
Thank you for your help. It is not possible that both will have both data. I
used yuor suggesrion and it works perfect!
--


Greatly appreciated

Eva


"KARL DEWEY" wrote:

> Thats why you should not have data in a spreadsheet fashion.
>
> Try this --
> SELECT [Cost C], [Cost D], IIF([Cost C] Is Not Null, "Cost C", "Cost D") AS
> [Data From]
> FROM YourTable
> WHERE [Cost C] Is Not Null AND [Cost D] Is Not Null;
>
> What will you do if both have data?
>
>
> --
> Build a little, test a little.
>
>
> "Eva" wrote:
>
> > Hi
> > I have a number of columns in the query and I created one column called data
> > from and I would like to put those headings to rows. How to do it?
> > Example
> > Cost C Cost D Data From
> > 1122 Cost C
> > 1122 Cost D
> >
> > Can you advise how to do it?
> > --
> >
> >
> > Greatly appreciated
> >
> > Eva