SQL-Using count and inner join in a single query

5 pts.
Tags:
SQL 2005
SQL 2005 Database
SQL generated files
SQL Query
SQL Server
SQL Server 2005
Hi Trying to retrive a report from the DataBase using left join on two tables. To get the count of resultant table, I'm using count. But the output shows error. If I comment count statement then the query executes successfully. I feel there is some error in the syntax of the count that I'm using. Please give me the exact syntax for both count as well as inner join. Thanks in advance.

Software/Hardware used:
MS SQL 2005

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    The general syntax is: SELECT <some_columns>, COUNT(*) FROM table1 t1 JOIN table2 t2 ON t1.columnX = t2.columnX WHERE ... GROUP BY <some_columns> Why don't you post your query, so we can tell you where your error is ?
    68,015 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following