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

Putting a space between selections for AS statement??

Status
Not open for further replies.

jayphilips

IS-IT--Management
Dec 18, 2001
14
US
Hi,

When using the AS in SELECT to select two columns as 1 how do you put a space between the two?

My code is:

SELECT TestRev2.EER, TestRev2.ParameterMeasured1, [GageID] & [GageDescription] AS [Gage 1]
FROM TestRev2, Gage
WHERE (((Gage.GageID)=[TestRev2].[GageID1]))
ORDER BY TestRev2.EER;

It returns the Gage1 as:
HRD-9-0002Torque Wrench

I would like it to display (if possible)as:
HRD-9-0002 Torque Wrench

Can anyone help me with this?

Thanks in advance!!! Jay
Get The Exposure Your Web Site Deserves
 
Did you try something like this

([GageID] & " " & [GageDescription]) AS [Gage 1]
 
Hi cmmrfrds,

Thanks for the fast reply. I tried this:

SELECT TestRev2.EER, ParameterMeasured1, [GageID] & " " & [GageDescription] AS Gage1
FROM TestRev2, Gage
WHERE (((Gage.GageID)=[TestRev2].[GageID1]))
ORDER BY TestRev2.EER;

The only problem with it is that if the one GageID is longer than another than the GageDescriptions don't display very nicely. How can I make the Gage1 display with the GageDescription aligned right & the GageID aligned left?

Thanks in advance!!! Jay
Get The Exposure Your Web Site Deserves
 
Hi again,

I have one more question about this. I need to have this statement done for 30 gages, the numbers in the code would change (GageID1 & ParameterMeasured1).

Do I need to make 30 different queries or is there an easire way.

In the end I want to just pull the EER# which is the same in each of the queries.

Any help would be very much apprecitated

Thanks in advance :) Jay
Get The Exposure Your Web Site Deserves
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top