• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

Can I Make My Access Query Add a Categorical Text Field to Each Record?

I am trying to assign a categorical label to each record returned from a query. I really only need it to add the same categorical label, e.g, "Blank Fields" to each record. No criteria.

I am using several small queries like this. Then, I will Stack them in Minitab and use the Categorical field to differentiate the data from each query.

Does that make sense?
0
Rex85
Asked:
Rex85
  • 4
  • 3
  • 2
1 Solution
 
Patrick MatthewsCommented:
Sure.

SELECT ColA, ColB, ColC, "Dummy text" AS MyLabel
FROM SomeTable

Open in new window

0
 
Patrick MatthewsCommented:
Or in the GUI query designer, just enter this in the first row of the grid:


MyLabel: "Dummy text"
0
 
Rex85Author Commented:
I was hoping it would be that simple! Thank you!

rex
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
NorieVBA ExpertCommented:
Am I missing something?

If you use the same label for each query how can you categorize them when you stack them?

0
 
Rex85Author Commented:
I have another label field in the data that varies (producing location) that will be the categorical label by which I stack them (I hope!) I'm trying to do a stacked bar, and I just couldn't get there from here the way the data was setup without having to create a function to assign a another label.

Due to data type difference though, I am having to use multiple stack commands. Since I am creating a Minitab macro to do all this, that's OK though.
0
 
Rex85Author Commented:
Oh...I am ODBC importing the tables separatley and then stacking them, so that MYLabel becomes the differentiator
0
 
NorieVBA ExpertCommented:
Just ignore me.:)

Not used MINITAB for many a year, and can only vaguely remember stacking.
0
 
Rex85Author Commented:
Well...the stack was OK, but it turns out you were right in the way the labels did not work the way I thought. I am still trying to wrap my head around what I need. I am having a hard time visualizing it. Thanks for the input.
0
 
NorieVBA ExpertCommented:
Do you need individual labels for each query?

How are you importing the data into MINITAB?

You mention ODBC but how are you using that to deal with multiple queries?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now