DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: TRIM() in PL/SQL Code

  1. #1
    Join Date
    Sep 2002
    Posts
    13

    TRIM() in PL/SQL Code

    Hi,

    While using TRIM() in PL/SQL block, I am getting the following error:

    "PLS-00103: Encountered the symbol ")" when expecting one of the following:

    from"

    It is working in ver. 8.1.6 but not in 8.1.7. Without TRIM(), it is working in 8.1.7 also. Is there any version compatibility?

    TIA

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Which patch level is the 8.1.7? Patch 8.1.7.4.1 (Windows) says it fixes some probs with the (R/L)TRIM functions, but not yours as far as I can see.

  3. #3
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Can you post your code that only deals with the TRIM.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  4. #4
    Join Date
    Sep 2002
    Posts
    13
    Hi sam,
    The following is the code i am using

    OPEN hyp_data;
    FETCH hyp_data BULK COLLECT INTO obj_year,obj_currency,obj_feed_cost,obj_credit_lvl6,obj_credit_lvl5,
    obj_credit_lvl4,obj_credit_lvl3,obj_credit_lvl2,obj_credit_lvl1;
    CLOSE hyp_data;
    FOR ctr1 IN 1..obj_feed_cost.COUNT LOOP
    IF obj_credit_lvl6(ctr1) IS NOT NULL THEN
    SELECT TRIM(year)||','||
    TRIM(currency_code)||','||
    TRIM(cost_centre_code)||','||
    obj_credit_lvl6(ctr1)||','||
    SUM(NVL(jan,0))||','||
    SUM(NVL(feb,0))||','||
    SUM(NVL(mar,0))||','||
    SUM(NVL(apr,0))||','||
    SUM(NVL(may,0))||','||
    SUM(NVL(jun,0))||','||
    SUM(NVL(jul,0))||','||
    SUM(NVL(aug,0))||','||
    SUM(NVL(sep,0))||','||
    SUM(NVL(oct,0))||','||
    SUM(NVL(nov,0))||','||
    SUM(NVL(dec,0))
    INTO lv_outstr
    FROM t_hyperion_data
    WHERE year = obj_year(ctr1)
    AND currency_code = obj_currency(ctr1)
    AND cost_centre_code = obj_feed_cost(ctr1)
    AND credit_card_lvl6 = obj_credit_lvl6(ctr1)
    AND credit_card_lvl6 IS NOT NULL
    AND TRUNC(record_to_date) = p_indate
    AND countrycode = p_cnt_cd
    GROUP BY year,currency_code,cost_centre_code,obj_credit_lvl6(ctr1);
    UTL_FILE.PUT_LINE(lv_ftype,lv_outstr);
    END IF;

    END LOOP;

    If i give alias name for the table 't_hyperian_data' then it is working, then using EXECUTE IMMEDIATE also it's working, with out that it's not working,
    our version is 8.1.7.0.0

    thanks and regards
    zzz

  5. #5
    Join Date
    Jul 2003
    Posts
    59
    See if:

    trim(' ' from colname)

    works.
    Tom Best

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width