If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > count() returns me 0 always

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-03-11, 09:07
navedjobs navedjobs is offline
Registered User
 
Join Date: Sep 2011
Posts: 35
count() returns me 0 always

Code:
select count(Emp_status) from emp_att where Emp_status = 'Present' and emp_id = 1
this return me 0 always even though there is an employee with emp_id = 1
and emp_status = 'Present' and date = '2-jan-2012'
why so , any help please ?
Reply With Quote
  #2 (permalink)  
Old 12-03-11, 09:43
navedjobs navedjobs is offline
Registered User
 
Join Date: Sep 2011
Posts: 35
solved

Quote:
Originally Posted by navedjobs View Post
Code:
select count(Emp_status) from emp_att where Emp_status = 'Present' and emp_id = 1
this return me 0 always even though there is an employee with emp_id = 1
and emp_status = 'Present' and date = '2-jan-2012'
why so , any help please ?
solved this problem
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On