Subject | RE: [firebird-support] blank character |
---|---|
Author | Hans |
Post date | 2011-05-08T18:23:32Z |
CREATE PROCEDURE U_VC_TO_A (
VC_IN VARCHAR (40),
STELLEN INTEGER)
RETURNS (
A_OUT VARCHAR (40))
AS
DECLARE BLANKS VARCHAR(40) = ' '; /* 40 BLANKS
LONG */
BEGIN
A_OUT = SUBSTRING(VC_IN || BLANKS FROM 1 FOR 40);
SUSPEND;
END
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Olaf Kluge
Sent: May-08-11 12:03 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] blank character
Hello again,
our ERP-Partner need all strings in a transfertable (firebird 2.5) filled
with blank characters. Example: 'article 123' filled to the length of 20:
'article 123 '. Now I have created a little procedure:
CREATE PROCEDURE U_VC_TO_A (
VC_IN VARCHAR (40),
STELLEN INTEGER)
RETURNS (
A_OUT VARCHAR (40))
AS
BEGIN
a_out = u_pright(vc_in,' ',stellen);
insert into tmp(c40) values (:a_out); --test!
SUSPEND;
END
U_pright is a function from freeudf (u_padright). It works (test it with
adding a new string on the blank character filled), but how can I save blank
characters in the firebird-table? I have test it with char and
varchar-fields, but the blank characters were missing (EMS-IB-Manager)
Thank you very much.
Olaf.
[Non-text portions of this message have been removed]
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the main
(top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
VC_IN VARCHAR (40),
STELLEN INTEGER)
RETURNS (
A_OUT VARCHAR (40))
AS
DECLARE BLANKS VARCHAR(40) = ' '; /* 40 BLANKS
LONG */
BEGIN
A_OUT = SUBSTRING(VC_IN || BLANKS FROM 1 FOR 40);
SUSPEND;
END
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Olaf Kluge
Sent: May-08-11 12:03 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] blank character
Hello again,
our ERP-Partner need all strings in a transfertable (firebird 2.5) filled
with blank characters. Example: 'article 123' filled to the length of 20:
'article 123 '. Now I have created a little procedure:
CREATE PROCEDURE U_VC_TO_A (
VC_IN VARCHAR (40),
STELLEN INTEGER)
RETURNS (
A_OUT VARCHAR (40))
AS
BEGIN
a_out = u_pright(vc_in,' ',stellen);
insert into tmp(c40) values (:a_out); --test!
SUSPEND;
END
U_pright is a function from freeudf (u_padright). It works (test it with
adding a new string on the blank character filled), but how can I save blank
characters in the firebird-table? I have test it with char and
varchar-fields, but the blank characters were missing (EMS-IB-Manager)
Thank you very much.
Olaf.
[Non-text portions of this message have been removed]
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the main
(top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links