SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 15th, 2004, 05:25 AM
inkdot inkdot is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 52 inkdot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 1 m 11 sec
Reputation Power: 5
SQL query

Im trying to do a sql query whereby it will count the cust_id. The checking now is it will check the cust_id from 2 tables. customer and answer tbl whether the id appear in both table and whether survey_taken ='Y'. But if the cust_id did not appear in the customer tbl it will still return 0. I want to ensure that the customer appear in the customer tbl be4 he is allow to take the survey. Is there any other way I can do the query?

select count(O.cust_id) as cnt from customer C, answer O
where C.cust_id= O.cust_id and O.survey_taken='Y' and O.cust_id=8

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > SQL query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT