You need to sign in to do that
Don't have an account?
anuraj
limit
Hi
Please tell me what is the use of limit in qures.
Have written the code like this
Timecard_Base__c timebase = new Timecard_Base__c(); timebase = [select WeekStartdate__c from Timecard_Base__c ];
then i got error that
System.QueryException: List has more than 1 row for assignment to SObject
Class.NigiController.retrive: line 10, column 19 External entry point
but when i changed code to
Timecard_Base__c timebase = new Timecard_Base__c(); timebase = [select WeekStartdate__c from Timecard_Base__c limit 1];
i am only getting 1 value i want all the values. Please help me .
thanks
Anuraj
The query in the first instance will return all the records from the object Timecard_Base__c. to store all the records you will need to have a list of the object type as follows
Now you can iterate through the list using a for loop etc.