-
Can I do a right pad in a Select Statement
Hello, I need to do a RPAD on the following statement, but it does not seem to work in a the Select or Where Clause. Can a RightPad be use in the following way?
Hello, I need to do a RPAD on the following statement, but it does not seem to work in a the Select or Where Clause.
Can a RightPad be use in the following way?
v_year = '2024';for (Candidate_Recs__c firstAssign : recsToProcess) {
for (Contact seqAssign : [ Select MIN(lastName.RightPad(40, ' ') +
firstName.RightPad(40, ' ') +
middleName.RightPad(40, ' ') )
, MIN(contact.pre_code)
FROM
Contact
WHERE
lastName.RightPad(40, ' ') +
firstName.RightPad(40, ' ') +
middleName.RightPad(40, ' ') +
>
firstAssign.lastName.RightPad(40, ' ') +
firstAssign.firstName.RightPad(40, ' ') +
firstAssign.MiddleNameRightPad(40, ' ') +
AND Contact.status IN ('AX', 'TQ', 'RO')
AND Contact.class_started = :v_class_yr
AND Contact.pre_code IS NOT NULL
AND Contact.employee_nbr IS NOT NULL]) {//Do Something
}
}
Thanks for any help in advance.-
This discussion was modified 3 years, 10 months ago by
Angela Wright.
-
This discussion was modified 3 years, 10 months ago by
Angela Wright.
-
This discussion was modified 3 years, 10 months ago by
Log In to reply.
Popular Salesforce Blogs

Lightning DataTable in Salesforce | The Developer Guide
A lightning-datatable part shows even information where every segment can be shown depending on the information type. For instance, an email address is shown as…

How to Create Profile and Manage Permissions on It | Salesforce Developer Guide
Introduction A profile in Salesforce is a group/collection of settings and permissions that define what a user can do in Salesforce. You can manage various…

Salesforce Code Builder is Officially Released
Salesforce Code Builder has been officially released and is now generally available, offering a new web-based integrated development environment (IDE) that seamlessly incorporates open, modern,…
Popular Salesforce Videos
Is Generative AI Is The New Future Of Salesforce?
Every industry, whether IT, Finance, or health, is moving towards AI? There has been a lot of talk about Generative AI and how it can…
Salesforce Einstein Discovery Spring 21
Einstein Discovery is AI-powered analytics that enables business users to automatically discover relevant patterns based on their data – without having to build sophisticated data…
Creating Massive Junction Records with LWC | Salesforce Lightning Tutorial
Don't miss this new interchange session with Jorge Ortega and Alba Rivas! They'll discuss how to build an LWC that allows you to easily create…
Popular Salesforce Infographics

Sales trends and performance: ANZ versus global
Technology is pushing customer expectations to all-time highs and sales organisations into uncharted territory. Organisations worldwide are coping differently as sales trends change operations. Sales…

AI and Salesforce Einstein Giving Customer Experience A New Direction
This Salesforce infographic will guide you with CEPTES leveraging the power of AI with new strategies and value chains.

Back to Basics: Salesforce Data Loading
Discover best practices for Salesforce data loading straight from the dataloader.io community with this useful Salesforce infographic. Users can quickly and easily delete or move…