Re: Allow a space at the end of a word in forms 5.0?

From: <pberetta_at_my-deja.com>
Date: Thu, 04 Nov 1999 16:57:09 GMT
Message-ID: <7vsdt2$n3$1_at_nnrp1.deja.com>


If you want to pad every entry with a specific number of characters, then try this, in a POST-TEXT-ITEM trigger - DECLARE v_num NUMBER(5);
BEGIN
  v_num := LENGTH(:block_name.item_name) + 1; -- to add 1 space   :block_name.item_name := RPAD(block_name,item_name,v_num); END; If it doesn't work there (Forms may still trim it), then try it in block level PRE-INSERT and PRE-UPDATE triggers. The caveat here is that once you insert a padded value in the table, you must account for this in every WHERE clause you write referencing that column, as in - WHERE col1 = 'SMITH ' or WHERE RTRIM(col1) = 'SMITH' or WHERE col1 LIKE '%SMITH%', because 'SMITH ' does NOT equal 'SMITH'. I can almost guarantee that someone else will fail to do this and wonder why their results are 'off'. To me, this is a compelling reason NOT to pad strings, but you know your specific need better than I do.

In article <7vs2fh$f3l$1_at_naxos.belnet.be>,   "Wim Valgaeren" <valgaeren_at_softhome.net> wrote:
> Is it possible to allow the value of a text item to end in a space
character
> in forms 5.0? Now he just drops the space when I go to the next item.
The
> length must remain variable.
>
> Thanks,
> Wim Valgaeren
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 04 1999 - 17:57:09 CET

Original text of this message