Board index » delphi » Update a varchar field with a part of this field

Update a varchar field with a part of this field


2005-05-17 04:27:01 PM
delphi83
Hi,
I need to replace a varchar(200) field with himself after removing the first character.
Is there a sql function like substring(string,index,length) ?
Thanks for help
Vincent Stryckmans
Infrabel
Belgian Railway Infrastructure
www.infrabel.be
 
 

Re:Update a varchar field with a part of this field

Yep, use SUBSTR UDF func like this .
SUBSTR( ColumnName, 1,199 )
Note : Some UDF funcs are not imported in the DataBase. If not type :
DECLARE EXTERNAL FUNCTION substr
CSTRING(255), SMALLINT, SMALLINT
RETURNS CSTRING(255) FREE_IT
ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
Hope It helps you
Mike
"Vincent Stryckmans" <XXXX@XXXXX.COM>writes
Quote

Hi,

I need to replace a varchar(200) field with himself after removing the
first character.

Is there a sql function like substring(string,index,length) ?

Thanks for help
Vincent Stryckmans
Infrabel
Belgian Railway Infrastructure
www.infrabel.be