Solved

ignore space between names within string

Posted on 2009-05-20
9
438 Views
Last Modified: 2012-05-07
The code below does not like the space between Manufacturer and Name:
Manufacurer Name
If i remove the space in between, the code works fine.
Is there a way to handle this?
SELECT Benchmark_LessThanr50Percent.* INTO test1

FROM Benchmark_LessThanr50Percent, [SELECT Benchmark_LessThanr50Percent.Manufacturer Name, Sum(Benchmark_LessThanr50Percent.Spend) AS SumOfSpend

        FROM Benchmark_LessThanr50Percent

        GROUP BY Benchmark_LessThanr50Percent.Manufacturer Name

        HAVING (((Sum(Benchmark_LessThanr50Percent.Spend))>100))]. AS Benchmark1

WHERE (((Benchmark_LessThanr50Percent.Manufacturer Name)=[Benchmark1].[Manufacturer Name]));

Open in new window

0
Comment
Question by:karinos57
  • 4
  • 2
9 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 250 total points
ID: 24434095
enclosed it with square brackets []

[Manufacturer Name]
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 24434113
copy and Paste this

SELECT Benchmark_LessThanr50Percent.* INTO test1
FROM Benchmark_LessThanr50Percent, (SELECT Benchmark_LessThanr50Percent.[Manufacturer Name], Sum(Benchmark_LessThanr50Percent.Spend) AS SumOfSpend
        FROM Benchmark_LessThanr50Percent
        GROUP BY Benchmark_LessThanr50Percent.[Manufacturer Name]
        HAVING (((Sum(Benchmark_LessThanr50Percent.Spend))>100))) AS Benchmark1
WHERE (((Benchmark_LessThanr50Percent.[Manufacturer Name])=[Benchmark1].[Manufacturer Name]));
0
 

Author Comment

by:karinos57
ID: 24434142
i am getting input message box which reads like "Enter Prameter Value"
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 119

Expert Comment

by:Rey Obrero
ID: 24434187
karinos57,
seen my second post?
0
 
LVL 1

Expert Comment

by:mcfitz13
ID: 24434853
Yeah that should do it.
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 24503496
karinos57,

wondering why you have to accept a comment like that as the solution to your problem..
0
 
LVL 1

Expert Comment

by:mcfitz13
ID: 24503521
I agree.... I don't deserve anything.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now