hello..
i have a simple table ATTENDANCE with following columns and value..
create table ATTENDANCE
(EMP_ID VARCHAR(20),
STATUS VARCHAR(10),
DATE DATETIME);
EMP_ID STATUS DATE
A1 PRESENT 2012-02-13 00:00:00.000
A2 PRESENT 2012-02-13 00:00:00.000
now my problem is when i m firing the query as:
select count(*) from ATTENDANCE where emp_id='A1' AND STATUS='PRESENT ';
it is showing "1" as answer and this is correct.
but when when i m firing the query as:
select count(*) from ATTENDANCE where emp_id='A2' AND STATUS='PRESENT ';
it is showing "0" as answer and this is NOT correct, IT SHOULD SHOW "1".
can anyone plz tell where i m wrong..
i m using sqlserver 2005 and windows 7 as OS..
DO REPLY SOON..
THANK U..
i have a simple table ATTENDANCE with following columns and value..
create table ATTENDANCE
(EMP_ID VARCHAR(20),
STATUS VARCHAR(10),
DATE DATETIME);
EMP_ID STATUS DATE
A1 PRESENT 2012-02-13 00:00:00.000
A2 PRESENT 2012-02-13 00:00:00.000
now my problem is when i m firing the query as:
select count(*) from ATTENDANCE where emp_id='A1' AND STATUS='PRESENT ';
it is showing "1" as answer and this is correct.
but when when i m firing the query as:
select count(*) from ATTENDANCE where emp_id='A2' AND STATUS='PRESENT ';
it is showing "0" as answer and this is NOT correct, IT SHOULD SHOW "1".
can anyone plz tell where i m wrong..
i m using sqlserver 2005 and windows 7 as OS..
DO REPLY SOON..
THANK U..
Comment