| 
	
 | 
 Posted by paulmac106 on 10/12/06 21:50 
If you could help me with my syntax i would really appreciate 
it. I'm trying to change the where clause on the fly, but it's 
giving me a syntax error. 
 
Hopefully from what I have below you can tell what i'm after 
 
the first part should evaluate a boolean expression, then if true, 
search using one field, otherwise 
search using a different field 
 
WHERE 
 
	Case WHEN @myCompany =  933 
	    THEN tblClient.companycode = 933 --problem line 
	ELSE 
		tblCase.clientcode = @myClient --problem line 
	END 
 
        And tblCase.status = 'Active' 
 
thank you!!
 
  
Navigation:
[Reply to this message] 
 |