x
login about faq Site discussion (meta-askssc)

I need to find out how many projects there are in the project table in sql query format

PROJECT
P_ID    PROJECT_NAME    CLIENT_ID   MGR_ID  PARENT_P_ID
1   Hardware Support Intranet   2   105  
2   Hardware Support Interface  2   103 1
3   Hardware Support Database   2   102 1
4   Teller Support System   4   105  
5   Internet Advertising    6   105  
6   Network Design  6   104 5
7   Exploration Database    5   102  
more ▼

asked Mar 24 '10 at 12:39 PM in Default

Michael 4 gravatar image

Michael 4
9 9 9 9

This is incredibly bad form. You haven't even half-bothered, yet you're expecting someone to do your work for you. I have just formatted the code, kev has re-tagged your question, please can you consider at least putting in the bare minimum of effort?

Mar 24 '10 at 06:00 PM Matt Whitfield ♦♦

WOULD THIS BE THE ANSWER SELECT P_ID From Project Where P_ID=Project And P_ID=7

Mar 26 '10 at 08:13 PM Michael 4
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

assuming one project per row...

select count(*) as c from project
more ▼

answered Mar 24 '10 at 02:33 PM

user-1392 gravatar image

user-1392
71 1

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x598
x321
x69

asked: Mar 24 '10 at 12:39 PM

Seen: 963 times

Last Updated: Mar 24 '10 at 05:59 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.