Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Problem with Where

Author  Topic 

cutiebo2t
Constraint Violating Yak Guru

256 Posts

Posted - 2008-05-10 : 01:27:59
What's the problem with the Where function? I can't get the correct results:

SELECT SesID, SesDate, ReviewDate, CallType, LEVEL, G_greet, G_ass, D_ask, D_chek, D_offer, D_conn, V_privac, V_prop, V_change, V_verif, R_reac, R_seq,
R_pay, R_prov, RE_ack, RE_prov, RE_targ, F_full, M_rev, M_comm, E_bc, E_sbc, E_asq, E_val, E_acct, E_add, C_save, C_canc, C_aol, C_nci, C_reg,
C_react, C_cure, C_auth, A_resp, A_pres, A_tym, A_inapp, A_exces, A_prov, A_acti, A_adjus, A_respond, S_conf, S_show, S_disp, S_coop, S_assum,
S_frien, MO_valid, MO_prop, SA_ask, SA_prem, SA_ack, SA_prov, SA_refer
FROM dbo.SMSCalB
WHERE LEVEL = 'coach and
qa' AND calltype = 'reactivations'

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-10 : 01:32:33
Whats the problem you're facing? Can you illustrate it with some sample data?
Go to Top of Page

cutiebo2t
Constraint Violating Yak Guru

256 Posts

Posted - 2008-05-10 : 01:35:53
I have problem with where function:
Is this correct?

WHERE LEVEL = 'coach and
qa' AND calltype = 'reactivations'
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-10 : 01:43:35
quote:
Originally posted by cutiebo2t

I have problem with where function:
Is this correct?

WHERE LEVEL = 'coach and
qa' AND calltype = 'reactivations'


I cant find any syntactical problems. By using this, you are trying to filter the records from your resultset having string value of 'coach and qa' for LEVEL field and having a calltype of 'reactivations'. Is this exactly what you want as your reuirements?
Go to Top of Page

cutiebo2t
Constraint Violating Yak Guru

256 Posts

Posted - 2008-05-10 : 01:46:46
yes I have 2 colmns. 1 is Level and the other in is Call Type
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-10 : 01:53:54
quote:
Originally posted by cutiebo2t

yes I have 2 colmns. 1 is Level and the other in is Call Type


Thats fine. But my question is are you looking only for records with value of Level as 'coach and qa' and Call Type value of 'reactivations'. Please note that this will match only records with Level value of 'coach and qa' and wont return any records that have 'coach' and 'qa' values alone.
Go to Top of Page
   

- Advertisement -