Query not accepted by Record Group

Hi,
The below mentioned query is running in oracle 3.3.4.0.0.(which i'm using in my work) and toad also but in forms 5.0 it is not accepting this query.when i enter this query in existing record group then it shows the error ' error frm-12001'
-- cannot create the rcord group (check your query).I have declared the variable in forms
Can someone pls tell me whats wrong with this sql query ?
Select Aim_Item_Desc.
From Lib_Annexure_Item_Master A,DEP_STATUS_MASTER b
Where Aim_Type_Id = (Select Atm_Type_Id
From Lib_Annexure_Type_Master
Where Upper(Atm_Type_Desc) = 'CONSTITUTION')
And (Upper(Aim_Item_Desc) in('TRUST','H U F','SOCIETY','PROPRIETORSHIP')
And :Global.Fv_C_Des_Ind='P')
Or ( Upper(Aim_Item_Desc) in ('Public limited company','Private limited company')
And :Global.Fv_C_Des_Ind ='Q')
Or (Upper(Aim_Item_Desc) ='PARTNERSHIP'
And :Global.Fv_C_Des_Ind ='R')
Or (Upper(Aim_Item_Desc) ='Individual'
Or :Global.Fv_C_Des_Ind ='S');

Gowtham1232 wrote:
Hi,
The below mentioned query is running in oracle 3.3.4.0.0.Seriously? Is there really a computer left that can run a version of oracle that old?
(which i'm using in my work) and toad also but in forms 5.0 it is not accepting this query.when i enter this query in existing record group then it shows the error ' error frm-12001'
As it's forms you may want to ask in the forms forum.

Similar Messages

  • Query not fetched the record

    Hello,
    Could someone help me please ?
    I have a listing of my sales orders and I want to make changes in my order by opening the form and fetched with that record. When I click on that particular orderno in my listing of order and call the form to display the details, it calls the form but says "Query could not fetch the record". I do not know why ? Please help me with the solution.
    Thanx

    Hello,
    I think you are passing orderno to called form as a parameter. If you are using parameter list check..
    1. If parameter data is getting in form correctly ?
    2. Next, have you changed where clause of other block,so that is will display record with passed orderno ?
    I am expecting more details from you.
    Thanx
    Adi

  • Personnel Admin AdHoc Query not retrieving all records

    Hi, I recently added a custom info type to a copy of the SAP ad hoc query for Personnel Admin by using the menu path in SQ02>Edit>Change Infotype selection . The query is picking up the new info type and runs fine but does not retrieve all records from the table for a given personnel id. It only retrieves 1 record per id.
    Has anyone dealt with this before and have an easy/quick fix for this?

    Have other users try the query, preferably a user with end user authorization.
    I've had this issue before, I'm an IT person and I customized a Standard infoset.
    During testing, I'm only getting 1 (in my case) Insurance record per employee.
    The end user can see multiple record per employee.
    Btw, did you customize a Global or a Standard Infoset?
    Regards,
    Olekan

  • Currency not accepting in Record

    Dear all,
    I'm creating a tax condition record based on weight. But system is not accepting any Unit as currency. What can be the possible reason?
    Thanks in advance.

    Don't understand your question - tax is normally a percentage why/how do you want to enter a currency?

  • Query not displaying all records when execute it first tme

    Hello,
    i have an issue with the WEBI report.when i run  the report first time it's displaying only few records, but when i run the same report second time it's displaying the more records and it's correct.
    Could any one tell me why it's not displaying all records when i execute first time.
    Thanks in advance for your help.
    Regards,
    Prathap

    Which BOBJ version do you use?
    Which kind of data source are you retrieving data from?
    Regards,
    Stratos

  • Query Not Returning Enough Records

    have two tables that I am trying to join together. 
    The first table shows the income for each department of the store broken down by period like this:
    Store_Data:
    Store_Type  Dept    Year  Period  Sales
    Grocer      Produce   11  01      31865.00   
    Grocer      Produce   11  02      32525.00   
    Grocer      Produce   11  03      37490.00   
    Grocer      Meat      11  01      224.00   
    Grocer      Dairy     11  02      5850.00   
    Grocer      Dairy     11  03      33209.92   
    Grocer      Dry       11  03      1000.00
    The second table contains a record for each store showing it's goal, like this:
    Goal_Data:
    Store_Type  Dept    Year  Amount
    Grocer      Produce   11  157192.00
    Grocer      Canned    11  0.00
    Grocer      Paper     11  146820.00
    Grocer      Meat      11  2168.00
    Grocer      Dairy     11  50000.00
    Grocer      Frozen    11  29464.00
    Grocer      Pet       11  330096.00
    Grocer      Dry       11  1716.00
    Grocer      Pharmacy  11  0.00
    Grocer      Misc      11  6668.00
    Now, I have a query to join the two tables.  What I want is for all the records in the second table, whether or not there is a corresponding record in the first (such as 'Meat' and 'Dairy').
    I have to filter on Store_Data.Store_Type, Store_Data.Year, Store_Data.Period
    Crystal is outputting the following SQL:
    SELECT DISTINCT
        Store_Data.Store_Type,
        Store_Data.Dept,
        Store_Data.Year,
        Store_Data.Period,
        Store_Data.Sales,
        Goal_Data.Amount
    FROM  
        Store_Data
        RIGHT OUTER JOIN Goal_Data
            ON ((Goal_Data.Dept=Store_Data.Dept) AND
            (Goal_Data.Store_Type=Store_Data.Store_Type))
            AND (Goal_Data.Year=Store_Data.Year)
    WHERE 
        Store_Data.Store_Type='Grocer'
        AND Store_Data.Year='11'
        AND (Store_Data.Period='01'
            OR Store_Data.Period='02'
            OR Store_Data.Period='03')
    But I'm only getting the records from the Store_Data table (and records in Goal_Data where the "ON" fields match).  Testing in SQL Server verifies that the query is producing incorrect output.
    What do I need to change to do what I'm wanting to do?

    It looks like the thread is going to take a left turn just about now.
    The problem appears to be that, for the query to work properly, the filter for the period has to be in the joins "ON" clause.
    This I accept.
    And, apparently, trhe only way to get a parameter value to go into that area is by using a stored procedure.
    To that end, I have created a Stored Procedure which takes three parameters, "Store_Type", "Year", and "Quarter"
    I have verified that the results are what I need.  I plugged the stored procedure into my report (which is technically a sub-report) and it asked me for the values of the parameters.  Entering them in, I do get a result that I would expect.
    Everything good so far.
    Now, about those parameters (both for the Storeed Procedure as well as the report).  As I said, the report that I have been working is actually a sub-report, one of five which will be on the main report.  Each report will require the same three parameters, two of which (year and quarter) need to be selected by the user and will feed the same values to all five sub-reports.  The third parameter should be "hard-coded" to each particular sub-report.
    Now for the issue (the main point being that I am unfamiliar with CR and Stored Procedures)...
    The way things are going now, when all is said and done, it looks like the user will be required to enter in the year and quarter for each sub-report (the Store_Type will be there too, but it will have a default value).  That's the user typing in '2012' for the year five times and '1' for the quarter five times.  This is unacceptable.
    So, how do I create a single Year parameter and a single Quarter parameter that will feed all five reports?
    Apparently trying to code it in the Report Selection Formula is not the right path.
    So, can someone either walk me through the process, or point me to a tutorial where the process is explained?
    TIA

  • EDiscovery Center Query Not Accepting 'Start' Date

    I have set up a new ediscovery site collection and am attempting to perform a query for content.I created a new case which has added a new subsite and then I attempted to use the search and export query. After clicking new item I am taken to the query:new
    item page.
    Adding a date using the date picker for start date does not work.  Clicking 'advanced query options' shows that no date filter is added.
    Clicking end date works correctly.
    Adding a free text date query or range works correctly.
    Has anyone else come across this bug with the start date box ?  Whatever is entered there is simply not being added as a query filter.  ???

    Hi Masa,
    thanks for your answer. Perhaps you also have a hint for the following:
    I can't really find in the metioned thread or in note 731637 what happens if a SC with several items is partially approved.
    Example:
    SC with 3 items:
    item 1 cc 1000
    item 2 cc 2000
    item 3 cc 1000
    Let's say item 1+3 have been approved by the approver found by badi and WS14500015. Is a PO or a purchase requisition created in backend? Or is it only created after the whole SC has been approved (i.e. also item 2).
    Thanks for a hint and best regards,
    Henning

  • 8i Query not returning expected records

    Using Oracle 8i (8.1.7), a basic spatial query is not returning all the expected results. Table1 contains a variety of polygons; table2 is simply a set of rectangles. I want to return all objects from table1 that intersect a particular rectangle. The query below mostly works, but misses out some objects. On my system, 38 objects are returned where about 41 are expected; on the client system (which does not have identical data) the problem appears to be much worse, with hardly any objects being returned. The missing objects are clearly visible on the map, surrounded on all sides by objects which have been selected correctly. Help?
    Select t1.id from table1 t1, table2 t2
    where t1.IsCurrent = -1
    and (sdo_relate(t1.geoloc, t2.geoloc, 'mask=ANYINTERACT querytype=WINDOW') = 'TRUE')
    AND (t2.ID in ('001'));

    Hi,
    When the non-spatial predicate is dropped, you mentioned the
    objects are not missing. This means the spatial index (which will
    surely be used in this case) should be returning correct results.
    But it is possible the index is not used when other predicates are
    specified. Please look at the "execution plan" in both cases (when the
    objects are missing/not missing).
    Rewrite the query as:
    select /*+ ORDERED INDEX(t1 <spatial_index_name>) */ t1.id from t2, t1
    This should ensure a spatial-index-based evaluation.
    Let us know the execution plans and the behavior in either case.
    Btw, one thing to check is your tolerance values in
    user_sdo_geom_metadata.
    - Ravi.

  • Source data for Record Group

    Hello,
    I am very new to Oracle Forms and have been tasked with pointing some forms we have to a new server and adding a couple of columns to come areas. Everything was going ok until I got to a the point where I have to add a new column to an area on a form. The forms are pointing to the new tables and the searches are working, or at least seem to be working. How can I tell the data source for a data group? I checked properties for the record group (RECORD_STATISTICS) that populates a certain area on a form and it has query selected as the record group type but there is no query showing. I added the column needed to the column specifications list but it does not show up when I run the form. There is a spot for it because the extra hyphen is there.
    Here is the code that populates the fields on the form. The field I added is the ahs_site column. As mentioned earlier I added that field to the RECORD_STATISTICS data group as well as to all the procedures I can find but am missing something..
    DECLARE
    htree ITEM;
    num_selected NUMBER;
    current_node FTREE.NODE;
    v_note_value number;
    v_node_depth number;
         total_rows number;
    group_id          RecordGroup;
    v_selection_count NUMBER;
    BEGIN
    -- Find the tree itself.
    htree := Find_Item('BLOCK_STATISTICS_TREE.TREE_ITEM_STAT');
    v_selection_count := Ftree.GET_TREE_PROPERTY(htree, Ftree.SELECTION_COUNT);
    IF v_selection_count>0 THEN
              v_note_value := Ftree.Get_Tree_Node_Property(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_VALUE);
              IF v_note_value IS NOT NULL THEN
                   group_id := Find_Group('RECORD_STATISTICS');
                   total_rows := Get_Group_Row_Count(group_id);
              v_node_depth := to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', v_note_value));
              -- :BLOCK_BUDGET_PARAMETER.DI_SELECTED2 := v_node_depth;
                   GO_BLOCK('BLOCK_STATISTICS_DETAIL');
                   CLEAR_BLOCK;
                   FOR i in v_note_value..total_rows LOOP
                        IF v_node_depth=4 THEN
                             :BLOCK_STATISTICS_DETAIL.DI_TEMPLATE_SEQ := Get_Group_Number_Cell('RECORD_STATISTICS.NODE_SEQ', v_note_value);
                             :BLOCK_STATISTICS_DETAIL.DI_DESCRIPTION := Get_Group_Number_Cell('RECORD_STATISTICS.SITE', v_note_value)
                             || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.AHS_SITE',v_note_value)
                                                                                                                            || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.PRIMARY_CD', v_note_value)
                                                                                                                            || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD', v_note_value)
                                                                                                                            || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD_DESC', v_note_value);
                             :BLOCK_STATISTICS_DETAIL.DI_YR_AND_MNTH := Get_Group_Number_Cell('RECORD_STATISTICS.YR_AND_MNTH', v_note_value);
                             :BLOCK_STATISTICS_DETAIL.TI_QUANTITY_STAT := Get_Group_Number_Cell('RECORD_STATISTICS.QUANTITY', v_note_value);
                        ELSE
                             IF Get_Group_Char_Cell('RECORD_STATISTICS.LEAF_NODE', i)='Y'
                                  AND v_node_depth < to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', i)) THEN
                                  :BLOCK_STATISTICS_DETAIL.DI_TEMPLATE_SEQ := Get_Group_Number_Cell('RECORD_STATISTICS.NODE_SEQ', i);
                                  :BLOCK_STATISTICS_DETAIL.DI_DESCRIPTION := Get_Group_Number_Cell('RECORD_STATISTICS.SITE', i)
                                  || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.AHS_SITE',i)
                                                                                                                                 || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.PRIMARY_CD', i)
                                                                                                                                 || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD', i)
                                                                                                                            || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD_DESC', i);
                                  :BLOCK_STATISTICS_DETAIL.DI_YR_AND_MNTH := Get_Group_Number_Cell('RECORD_STATISTICS.YR_AND_MNTH', i);
                                  :BLOCK_STATISTICS_DETAIL.TI_QUANTITY_STAT := Get_Group_Number_Cell('RECORD_STATISTICS.QUANTITY', i);
                                  Next_record;
                             ELSIF v_note_value<>i AND v_node_depth = to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', i)) THEN
                                  EXIT;
                             END IF;
                        END IF;
                   END LOOP;
                   First_record;
         END IF;
         END IF;
    END;
    Hope that made sense. I do not understand how data flows through forms just yet or how to phrase my question in terms that understandable. I do have some screen shots I could send anyone willing to help.
    Thank you.

    Adding a column to column specification does nothing.
    First of all, check the record group query in record group properties:
    1) In forms builder object tree find that record group, right-click > property palette.
    2) Look for property (just cann't remember exactly its name) where select query is specified.
    3) Add the column you need to the query. Column specification will refresh automatically.
    There is one more way to specify query for record group. Look for calls of POPULATE_GROUP_WITH_QUERY procedure in the form code.
    Forms 6i: menu program > find and replace pl/sql, Forms 10: edit > find and replace pl/sql. In the search field type POPULATE_GROUP_WITH_QUERY. Then see the results where your record group RECORD_STATISTIC is being populated programmatically. If no calls were found - the only data source is in record groups properties.

  • Creating Record Group dynamically.

    Hi,
    I have multi line block. My req is i have create record group dynamically based on some fields in line level. This my code in To Location - Key next item,
    DECLARE
    group_id          RecordGroup;
    v_lms_lov lov;
    BEGIN
    group_id := Create_Group_From_Query ('RG_LMSID',
    'SELECT lms_id
    FROM sify_lms_header
    WHERE from_location = :lines.from_location
    AND to_location = :lines.to_location;'
    v_lms_lov := find_lov('LOV_LMSID');
    set_lov_property(v_lms_lov,group_name,'RG_LMSID');
    Set_Item_Property('LINES.LMS_ID',LOV_NAME,'LOV_LMSID');
    END;
    It says, no records in lov. Anything i missed.
    Or any other way to achieve this.
    Pl help.
    Thanks
    Kavitha

    Kavitha,
    Why you need Dynamic record group for this?, you can give the control names in the record group query. Then the record group's query will be
    SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = :LINES.FROM_LOCATION AND TO_LOCATION = :LINES.TO_LOCATIONAnd if you still want to use the dynamic record group creation, then try
    DECLARE
         RG_Group_ID RECORDGROUP;
    BEGIN
         RG_Group_ID := FIND_GROUP('RG_LMSID');
      IF NOT Id_Null(RG_Group_ID) THEN
              DELETE_GROUP(RG_Group_ID);
      END IF;
         RG_Group_ID := CREATE_GROUP_FROM_QUERY('RG_LMSID', 'SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = ''' || :LINES.FROM_LOCATION || ''' AND TO_LOCATION = ''' || :LINES.TO_LOCATION || '''');
         SET_LOV_PROPERTY('LOV_LMSID',     GROUP_NAME, 'RG_LMSID');
         SET_ITEM_PROPERTY('LINES.LMS_ID', LOV_NAME,   'LOV_LMSID');
    END;Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • Dynamic record group

    Please explain me step by step to create dynamic record group and populate it into my combo box.
    thanks
    rupal
    Edited by: rupearlkaushal on Jun 13, 2012 9:39 PM

    hi
    plz check out the following threads.
    Dynamic creation of record group
    and
    Dynamic Record Group
    LOV (List of Values)
    LOV is nothing but a form item which is used to provide list of values to a text field.
    Each LOV contains a Record Group which provides the data to the LOV
    Record Group
    A record groups contains the query which is used to populate the values to the LOV.
    To alter a list of values(LOV) of a text field, we should change the query of the
    record group which is attached to the corresponding LOV or we should create a
    new record group and attach it to the existing LOV.
    Note : We cant create a new LOV. But we can attach a exsiting LOV to a form field.Method 1: Changing the query of the existing Record group
    declare
    rg_id RECORDGROUP ;
    err number;
    lv_id lov;
    begin
    rg_id:=find_group('LOV4'); -- LOV4 is the name of the existing LOV
    if not id_null(rg_id) then
    err:=populate_group_with_query(rg_id,
             'select deptno from dept where dname=''SALES''');
    end if;
    lv_id:=find_lov('LOV4');
    set_lov_property(lv_id,group_name,rg_id);Method 2: Creating a new Record Group if doesn't exists
    declare
    rg_id recordgroup;
    pg_num number;
    lv_id lov;
    begin
    rg_id:=find_group('MYGROUP');  -- MYGROUP is the Group Name
    if id_null(rg_id) then
    rg_id:=create_group_from_query('MYGROUP','SELECT 100 deptno FROM dual');
    end if;
    pg_num:=populate_group(rg_id);
    lv_id:=find_lov('LOV4');sarah
    Edited by: Sarah on Jun 13, 2012 9:56 PM

  • Which two statements define a Static Record Group?

    Hi all
    I read this question and I do not know the answer
    the question is
    Which two statements define a Static Record Group? (Choose two)
    A. The Record Group can be created only at run time.
    B. The Record Group is not associated with a query.
    C. The Record Group can be created and modified only at design time.
    D. The Record Group can be created and modified at design time or at run time.
    E. You can modify the structure of this Record Group by adding columns and rows at run time.
    F. You can modify the structure of this Record Group by associating it with a query at run time.

    Types of record group, either Static or Query:
    Static     Specifies that the record group is constructed of explicitly defined column names and column values.
    The values of a static record group are specified at design time and cannot be changed at runtime.
    Query     Specifies that the record group is associated with a SELECT statement, and thus can be populated dynamically at runtime.
    When you select this option, enter the SELECT statement in the multi-line field provided, then choose Apply.
    So answers B and C
    From Forms Help

  • Help with poplist record group query

    Hi, I want to populate a poplist based on the following query:
    SELECT value
    FROM table.value
    WHERE code_parent IS NULL
    UNION ALL
    SELECT 'ALL'
    FROM dual
    ORDER
    BY code
    Now I know that you need 2 columns in the record group to populate a poplist, but I cannot seem to modify the query to have 2 columns. I am basically adding the 'ALL' value, which will have a label of 'ALL' and a value of 'ALL'.
    The first select I can easily modify to be an acceptable record group for a dynamic poplist, Its the union that im having problems with. The following select does not work. Help would be appreciated.
    SELECT table.value, table.value
    FROM table.value
    WHERE code_parent IS NULL
    UNION ALL
    SELECT 'ALL', 'ALL'
    FROM dual
    ORDER
    BY table.value

    Based on the error I'd guess that one of your columns are defined as a number and the union columns are both varchar2. Match the datatype with the column it corresponds to:
    UNION
    SELECT 'ALL', 0
    FROM DUAL
    ORDER BY 1
    The order by clause also needs to reference the column number instead of the column name since the union clause does not have a column name.

  • Using 'like' in record group query

    Hi ,
    (Forms 6i)
    I'm creating a record group dynamically.
    So in when new item trigger for a list item,
    i want to list all names from a table like 'a%';
    query : select name, to_char(id) id from test_name where name like 'a%';
    but i'm not able give single quote(') in the query.
    Is there a way to do that?
    Edited by: Tuts009 on May 9, 2010 1:38 AM

    Hi Arif,
    i'm not giving a% directly in the query, this i'm getiing from what we type in the list , so :list4
    i'm storing it in another string say str and then the query will be
    str := :list4||'%';
    rg_id := Create_Group_From_Query( rg_name,
                               'SELECT name,to_char(id) id from test_name where name like '||str); Now any help?

  • Error message:FRM-12001: Cannot Create the record group(check your query)

    Requirement: Need to get employee name and number in the LOV in search criteria.
    So I created LOV "full_name" and Record group Query under Employee Name property palette with
    select papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name
    ,papf.employee_number
    from apps.per_all_people_f papf, apps.per_person_types ppt
    where sysdate between papf.effective_start_date and papf.effective_end_date AND papf.person_type_id=ppt.person_type_id AND ppt.system_person_type IN ('EMP', 'OTHER', 'CWK','EMP_APL')
    AND PPT.default_flag='Y' and papf.BUSINESS_GROUP_ID=1
    order by papf.full_name
    I was unable to save and getting error message "FRM-12001: Cannot Create the record group(check your query)".
    I cant use PER_ALL_PEOPLE_F.FULL_NAME since full name here is last_name||title||middle_names||firstname.
    But my requiremnet is papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name .
    Can any one of you help me.

    First, Magoo wrote:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">create or replace function emp_full_name ( p_title in varchar2,
    p_last_name in varchar2,
    p_first_name in varchar2,
    p_mid_names in varchar2 ) return varchar2 is
    begin
    for l_rec in ( select decode ( p_title, null, null, p_title || ' ' ) ||
    p_last_name || ', ' || p_first_name ||
    decode ( p_mid_names, null, null, ' ' || p_mid_names ) full_name
    from dual ) loop
    return ( l_rec.full_name );
    end loop;
    end;</font></pre>
    Magoo, you don't ever need to use Select from Dual. And the loop is completely unnecessary, since Dual always returns only one record. This would be much simpler:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">create or replace function emp_full_name
    ( p_title in varchar2,
    p_last_name in varchar2,
    p_first_name in varchar2,
    p_mid_names in varchar2 ) return varchar2 is
    begin
    Return ( Ltrim( Rtrim ( p_title
    ||' ' ||p_last_name
    ||', '||p_first_name
    ||' ' ||p_middle_names )));
    end;</font></pre>
    And second:
    user606106, you did not mention how you got your record group working. However, you DO have an issue with spaces. If you change this:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">select papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name
    ,papf.employee_number </font></pre>
    to this:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">select Ltrim(Rtrim(papf.title||' '||papf.last_name||', '
    ||papf.first_name||' '||papf.middle_names)) AS emp_full_name,
    papf.employee_number</font></pre>
    it should work. The Ltrim(Rtrim()) removes leading and trailing spaces from the resulting full name.

Maybe you are looking for