Re: Query Help - PLEASE
- From: "Robby" <robby.pollard@xxxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 00:12:41 -0600
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
.
- Follow-Ups:
- Re: Query Help - PLEASE
- From: Tom Ellison
- Re: Query Help - PLEASE
- References:
- Query Help - PLEASE
- From: Robby
- Re: Query Help - PLEASE
- From: Tom Ellison
- Query Help - PLEASE
- Prev by Date: Re: User to select different fields
- Next by Date: Re: Query Help - PLEASE
- Previous by thread: Re: Query Help - PLEASE
- Next by thread: Re: Query Help - PLEASE
- Index(es):
Relevant Pages
|
|