Activity Forums Salesforce® Discussions Can I do a right pad in a Select Statement

  • Can I do a right pad in a Select Statement

    Posted by Angela on April 5, 2021 at 7:24 pm

    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, 7 months ago by  Angela Wright.
    • This discussion was modified 3 years, 7 months ago by  Angela Wright.
    Angela replied 3 years, 7 months ago 1 Member · 0 Replies
  • 0 Replies

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Popular Salesforce Infographics