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

ignore space between names within string

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
karinos57
Asked:
karinos57
  • 4
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:
enclosed it with square brackets []

[Manufacturer Name]
0
 
Rey Obrero (Capricorn1)Commented:
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
 
karinos57Author Commented:
i am getting input message box which reads like "Enter Prameter Value"
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
Rey Obrero (Capricorn1)Commented:
karinos57,
seen my second post?
0
 
mcfitz13Commented:
Yeah that should do it.
0
 
Rey Obrero (Capricorn1)Commented:
karinos57,

wondering why you have to accept a comment like that as the solution to your problem..
0
 
mcfitz13Commented:
I agree.... I don't deserve anything.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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