Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Trunc function alternative


This question is answered.


Permlink Replies: 2 - Last Post: Nov 22, 2014 2:26 AM Last Post By: John Birch
John Birch

Posts: 135
Registered: 8/23/02
Trunc function alternative  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 21, 2014 1:40 PM
I am convert an SQL that uses the "Trunc" function from Firebird to InterBase XE3 and I wonder what is the alternative function I can use ?
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: Trunc function alternative
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 21, 2014 10:31 PM   in response to: John Birch in response to: John Birch
John Birch wrote:
I am convert an SQL that uses the "Trunc" function from Firebird to InterBase XE3 and I wonder what is the alternative function I can use ?

The UDF library you already installed comes with floor() which is the C term for
truncate. If you want it called truncate all you do is change he name in the
SQL script like

DECLARE EXTERNAL FUNCTION TRUNC
DOUBLE PRECISION
RETURNS DOUBLE PRECISION BY VALUE
ENTRY_POINT 'IB_UDF_floor' MODULE_NAME 'ib_udf';

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted corridors of Whitehall.
(Fish)
John Birch

Posts: 135
Registered: 8/23/02
Re: Trunc function alternative  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 22, 2014 2:26 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Jeff Overcash (TeamB) wrote:
The UDF library you already installed comes with floor() which is the C term for
truncate.

Floor() will do fine, many thanks Jeff.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02