Re: Query Help - PLEASE



I like it! But I am getting the following error when I run it.

[Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and image
data types cannot be compared or sorted, except when using IS NULL or LIKE
operator.

I got the same error when I ran my query and I thought it was the syntax of
the query. Here is what I was running.

SELECT l_includes, COUNT(l_includes) AS MyResults
FROM support
WHERE (l_path = 'support')
GROUP BY l_includes

SELECT l_includes, COUNT(l_includes) AS MyResults
FROM support
WHERE (l_path = 'www')
GROUP BY l_includes

SELECT l_includes, COUNT(l_includes) AS MyResults
FROM support
GROUP BY l_includes

As you can see yours makes it a lot less work on me and I like that. I
guess I have a different issue and I will need to research and see what it
is. On my statement above it did not like
(l_path = 'www') if I changed it to (l_path LIKE 'www') like the error
message said it would work.

Robby

"Tom Ellison" <tellison@xxxxxxxxxxx> wrote in message
news:ufbeBv7UGHA.5704@xxxxxxxxxxxxxxxxxxxxxxx
Dear Robby:

Sounds like:

SELECT l_include AS [Search word],
l_path AS [location of search],
COUNT(*) AS [number of searches]
FROM YourTable
GROUP BY l_include, l_path
ORDER BY l_include, l_path

Put the actual name of YourTable in the above.

Anywhere close?

Tom Ellison


"Robby" <robby.pollard@xxxxxxxxxxxxx> wrote in message
news:Oq7Vbk7UGHA.4436@xxxxxxxxxxxxxxxxxxxxxxx
I am in need of a little help. I need to write a query to total up some
search results. Here is a same of the data.

l_id l_include l_path
664 test Support
665 test Support
666 test Support
667 test www
670 visio Support
671 patent Support
672 stencil visio Support
676 doc tech Support
677 doc tech www
684 backpack Support
685 fiber panel patch Support
686 fiber panel patch www
687 data ps2 signal video Support
688 c/port signals Support
689 doc tech Support

I need a query that will show the number of hits for each item under
column
l_include for each of the unique paths. So for "TEST" I would need it to
look like:

Search word location of search number of searches
test Support 3
test www 1

For "doc tech" it would look like:
doc tech www 1
doc tech Support 2

If you could point me in the right direction I would greatly appreciate
it.

Robby







.



Relevant Pages

  • Re: Query Help - PLEASE
    ... Tom Ellison ... data types cannot be compared or sorted, except when using IS NULL or LIKE ... I got the same error when I ran my query and I thought it was the syntax ... SELECT l_includes, COUNTAS MyResults ...
    (microsoft.public.access.queries)
  • Re: reserved error -1524 access 2007
    ... OT and cod are the same type ... If OT is a query, ... difficult to trace what's going on without details of the field types. ... It might be that JET is getting the data types mixed up. ...
    (microsoft.public.access.queries)
  • Re: Query Too Complex
    ... what data types are in use at each level? ... > the grouping levels, however this is by no means ideal. ... > Do you know of anything I can do to make this report run with the number ... >> how to run the query. ...
    (microsoft.public.access.reports)
  • Re: Selecting records using criteria as arguments for a mathematical operation
    ... Show us your query and the data types of the fields involved. ... error message seems to indicate you're doing something that violates ... In the Totals row of the query builder, have you considered changing the Sales column from GroupBy to Sum? ...
    (comp.databases.ms-access)
  • Re: Specified Cast is not Valid
    ... Actually the final query will have about 3 columns returned from the DB. ... >> I have a method that executes a SQL Server stored procedure returning the ... >> int from SQL server I need to find out why I am getting specified cast is ... >> data types vs the sql data types. ...
    (microsoft.public.dotnet.languages.csharp)