You need to sign in to do that
Don't have an account?
minnuchcloud@gmail.com
How to write a Query
Custom object name is employ__C
And fields are city__c
Sex__c
Department no__C
Salary__C
I need a quarry for list of records ,if I enter into sex field 'male' I need all male records,and same for 'female' records
And if I enter department no I need all male and female and city and salary records
If I enter into salary I need all records city ,sex ,department no ,
Pl send me this query
How are you storing the user's selections? I.e. are you capturing these into an instance of Employee__c that carries the criteria, or are they stored in string variables etc?
It sounds like you may need to use dynamic apex to build the query based on the user's selections. There's an example of this in the following blog post (not mine):
http://blog.crmscience.com/2012/02/dynamic-soql-queries-with-zero-to-many.html
capturing these into an instance of Employee__c
Sir I need client when ever enter any field like ' city ' then he will get that city records including employees gender and department no and salary ,
I want salary range >=10000
<=100000
And I f client didn't enter into city field then he will get all records of male and female
Like that I need sir Pl
Check the link I posted - that builds a query dynamically based on populated fields.