Link to home
Start Free TrialLog in
Avatar of MaxKroy
MaxKroy

asked on

SQL Query between two tables

Greetings,
I am trying to use the following query to draw out articles from one table based on their date and a keyword and then sort through the description column in the article table looking for international cities to tie that article to.  For instance:

SELECT  Article.Date, Article.Title, Article.Link, City.City, City.Latitude, City.Longitude FROM Article INNER JOIN City
ON City.City Like '%' + Article.Description + '%' WHERE Article.IndexGUID='f50c528b-230f-4732-b3a9-138c7af039c2' AND
Article.Date BETWEEN '1/1/2012' AND '3/1/2012' AND Article.Title LIKE '%computer%' GROUP BY Article.Date, Article.Title,
Article.Link, City.City, City.Latitude, City.Longitude ORDER BY Article.Date DESC

For some reason this query doesn't work.  Any help would be extremely appreciated.  Thanks in advance.
Avatar of BuggyCoder
BuggyCoder
Flag of India image

you are doing group by and no aggregate function is used in select statement.
please re-check what you are trying to achieve here...
Avatar of MaxKroy
MaxKroy

ASKER

that doesn't help..thanks though??
ASKER CERTIFIED SOLUTION
Avatar of BuggyCoder
BuggyCoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MaxKroy

ASKER

Thanks.