A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

flip this query



 
 
Thread Tools Display Modes
  #1  
Old February 14th, 2007, 01:52 PM posted to microsoft.public.access.queries
rodchar
external usenet poster
 
Posts: 97
Default flip this query

hey all,
i have a query that produces the following results:

field1 field2 field3
------ ------ -------
val1 val2 val3

well there are so many fields that it would fit better if displayed in
portrait. is there a way to take these results and make it like the following:

field1: val1
field2: val2
field3: val3

or would i need to modify the original query? and if so, what concept/basic
syntax would be involved?

thanks,
rodchar
  #2  
Old February 14th, 2007, 02:04 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default flip this query

Show us the SQL of your existing query. Open the query in design view. Next
go to View, SQL View and copy and past it here. Some sample data would be
nice too.

Hopefully it's a crosstab query that has the word TRANSFORM in it. If not,
the problem may well be that the table isn't properly normalized in that it
should probably look like what you want to see in the first place.

Hopefully I'm wrong (frequently) and your data is something like:

Jerry
Whittle
123 Main St.
Anytown
Illinois
55555
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"rodchar" wrote:

hey all,
i have a query that produces the following results:

field1 field2 field3
------ ------ -------
val1 val2 val3

well there are so many fields that it would fit better if displayed in
portrait. is there a way to take these results and make it like the following:

field1: val1
field2: val2
field3: val3

or would i need to modify the original query? and if so, what concept/basic
syntax would be involved?

thanks,
rodchar

  #3  
Old February 14th, 2007, 03:31 PM posted to microsoft.public.access.queries
rodchar
external usenet poster
 
Posts: 97
Default flip this query

i don't have any real code yet i'm just trying to get to correct concept.
basically my original post sql was referring to a straight select statement:
select field1, field2, field3 from myTable

so it seems i should do some research on crosstab queries

"Jerry Whittle" wrote:

Show us the SQL of your existing query. Open the query in design view. Next
go to View, SQL View and copy and past it here. Some sample data would be
nice too.

Hopefully it's a crosstab query that has the word TRANSFORM in it. If not,
the problem may well be that the table isn't properly normalized in that it
should probably look like what you want to see in the first place.

Hopefully I'm wrong (frequently) and your data is something like:

Jerry
Whittle
123 Main St.
Anytown
Illinois
55555
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"rodchar" wrote:

hey all,
i have a query that produces the following results:

field1 field2 field3
------ ------ -------
val1 val2 val3

well there are so many fields that it would fit better if displayed in
portrait. is there a way to take these results and make it like the following:

field1: val1
field2: val2
field3: val3

or would i need to modify the original query? and if so, what concept/basic
syntax would be involved?

thanks,
rodchar

  #4  
Old February 14th, 2007, 10:29 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default flip this query

On Wed, 14 Feb 2007 07:31:08 -0800, rodchar
wrote:

i don't have any real code yet i'm just trying to get to correct concept.
basically my original post sql was referring to a straight select statement:
select field1, field2, field3 from myTable

so it seems i should do some research on crosstab queries


.... but first, perhaps you should do some research on normalization;
if it's equally logical to have field1, field2 and field3 in a
tall-skinny table vs. a wide-flat table, you may have an incorrect
data structure, and the tall-skinny would be better *for the table
itself*. It's much easier to use a crosstab query to flatten a
tall-thin table than to normalize a wide-flat spreadsheet!

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.