Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 18th, 2005, 09:10 AM
magoer magoer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 4 magoer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 55 sec
Reputation Power: 0
firebird udf ltrim function

Hi,

I have configured firebird.conf (i use Firebird with Windows XP) as below :
RootDirectory = E:\Program Files\FireBird\FireBird_1_5
UdfAccess = Restrict UDF
and after i have restarded my machine.
When i use the function ltrim i have that "Sql error code = -804 function unknown ltrim". My SQL auery is :

FOR
SELECT id_nat
FROM IMPORT1
INTO :id_nat_ori

DO
BEGIN
IF(cast(id_nat_ori as integer) < 99999999) THEN
BEGIN
id_nat = ltrim(:id_nat_ori);
UPDATE IMPORT1
set id_nat = :id_nat;
END
END


Thanks for help !

Reply With Quote
  #2  
Old July 18th, 2005, 01:40 PM
irie irie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Hamburg - Germany
Posts: 61 irie User rank is Private First Class (20 - 50 Reputation Level)irie User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 29 m 50 sec
Reputation Power: 7
You must declare the external function before you can use it. Execute this sql
Code:
DECLARE EXTERNAL FUNCTION ltrim
CSTRING(255)
RETURNS CSTRING(255) FREE_IT
ENTRY_POINT 'IB_UDF_ltrim' MODULE_NAME 'ib_udf';

or the execute the ib_udf.sql file from the UDF directory to get them all.

Lutz
__________________
web based Firebird and InterBase administration: http://ibwebadmin.sf.net

Reply With Quote
  #3  
Old July 19th, 2005, 08:24 AM
magoer magoer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 4 magoer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 55 sec
Reputation Power: 0
ltrim

Thanks for your reply.
I tried to execute the ib_sql.udf ans I obtained this message :

"DEFINE FUNCTION failed - attemp to store duplicate value (...) in unique index RDB$INDEX_9"

Sorry but I begin with Firebird.
Best regards.

Magoer

Reply With Quote
  #4  
Old July 20th, 2005, 01:56 PM
irie irie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Hamburg - Germany
Posts: 61 irie User rank is Private First Class (20 - 50 Reputation Level)irie User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 29 m 50 sec
Reputation Power: 7
Quote:
Originally Posted by magoer
"DEFINE FUNCTION failed - attemp to store duplicate value (...) in unique index RDB$INDEX_9"

The message indicates that some of the functions from ib_udf.sql are already defined in your database. You can execute
Code:
SELECT RDB$FUNCTION_NAME FROM RDB$FUNCTIONS
to get a list of the defined udf's. But better you choose a tool from http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_admin_tools

Lutz

--
web based Firebird and InterBase administration: http://www.ibwebadmin.net

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > firebird udf ltrim function


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT