473,322 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

DB2 MIGRATION: SYBASE Functions list

All,

We have listed out the INBUILT Function differences between Sybase and
DB2.

Kindly provide your feedback or corrections and for CHANGES - DO WE
NEED TO CODE our own UDFs?

STRING FUNCTIONS

SYBASE DB2 REMARKS
=========================
ABS ABS NO CHANGE
ACOS ACOS NO CHANGE
CEILING CEILING NO CHANGE
COS COS NO CHANGE
COT COT NO CHANGE
DEGREES DEGREES NO CHANGE
EXP EXP NO CHANGE
FLOOR FLOOR NO CHANGE
LOG LOG NO CHANGE
LOG10 LOG10 NO CHANGE
PI - NO EQUIVALENT
POWER POWER NO CHANGE
RADIANS RADIANS NO CHANGE
RAND RAND NO CHANGE
ROUND ROUND NO CHANGE
SIGN SIGN NO CHANGE
SIN SIN NO CHANGE
SQRT SQRT NO CHANGE
SQUARE - NO EQUIVALENT
TAN TAN NO CHANGE

AGGREGATE FUNCTIONS

SYBASE DB2 REMARKS
======================
AVG AVG NO CHANGE
COUNT COUNT NO CHANGE
MAX MAX NO CHANGE
MIN MIN NO CHANGE
SUM SUM NO CHANGE

STRING FUNCTIONS

SYBASE DB2 REMARKS
========================================

ASCII ASCII NO CHANGE
CHAR CHR CHANGE
CHARINDEX POSSTROR LOCATE CHANGE 1
CHAR_LENGTH LENGTH NO CHANGE
DIFFERENCE DIFFERENCE NO CHANGE
LOWER LOWER OR LCASE OPTIONAL
LTRIM LTRIM NO CHANGE
PATINDEX POSSTR CHANGE 1
REPLICATE REPEAT CHANGE
REVERSE - NO EQUIVALENT
RIGHT RIGHT NO CHANGE
RTRIM RTRIM NO CHANGE
SOUNDEX SOUNDEX NO CHANGE
SPACE SPACE NO CHANGE
STR CHAR PARTLY EQUIVALENT 2
STUFF INSERT CHANGE
SUBSTRING SUBSTR CHANGE IN NAME SAME PARAMETERS

SYSTEM FUNCTIONS

SYBASE DB2 REMARKS
============================================

COL_LENGTH - NO EQUIVALENT
COL_SIZE - NO EQUIVALENT
CURUNRESERVEDPGS - NO EQUIVALENT
DATA_PGS - NO EQUIVALENT
DATALENGTH LENGTH CHANGE
DB_ID - NO EQUIVALENT
DB_NAME - NO EQUIVALENT
HOST_ID - NO EQUIVALENT
HOST_NAME - NO EQUIVALENT
INDEX_COL - NO EQUIVQLENT
ISNULL COALESCE NO CHANGE
ICT_ADMIN - NO EQUIVALENT
OBJECT_ID - NO EQUIVALENT
OBJECT_NAME - NO EQUIVALENT
PTN_DATA_PGS - NO EQUIVALENT
RESERVED_PGS - NO EQUIVALENT
ROWCNT - NO EQUIVALENT
SUSER_ID - NO EQUIVALENT
SUSER_NAME CURRENT USER CHANGE
TSEQUAL - NO EQUIVALENT
USED_PGS - NO EQUIVALENT
USER CURRENT USER CHANGE
USER_ID - NO EQUIVALENT
USER_NAME CURRENT USER CHANGE
VALID_NAME - NO EQUIVALENT
VALID_USER - NO EQUIVALENT

TEXT FUNCTIONS

SYBASE DB2 REMARKS
============================================

TEXTPTR - NO EQUIVALENT
TEXTVALID - NO EQUIVALENT

CONVERSION FUNCTIONS

SYBASE DB2 REMARKS
============================================
CONVERT PC CHANGE
HEXTOINT - NO EQUIVALENT
INTTOHEX HEX PARTIALLY EQUIVALENT 3

DATE FUNCTIONS

SYBASE DB2 REMARKS
============================================
DATEADD - DATE ARITHMETIC CAN BE USED
DATEDIFF - DATE ARITHMETIC CAN BE USED
DATENAME - DATE ARITHMETIC CAN BE USED
DATEPART - DATE ARITHMETIC CAN BE USED
GETDATE CURRENT TIMESTAMP CHANGE
SECURITY FUNCTIONS

SYBASE DB2 REMARKS
============================================
IS_SEC_SERVICE_ON - NO EQUIVALENT
MUT_EXCL_ROLES - NO EQUIVALENT
PROC_ROLE - NO EQUIVALENT
ROLE_CONTAIN - NO EQUIVALENT
ROLE_ID - NO EQUIVALENT
ROLE_NAME - NO EQUIVALENT
SHOW_ROLE - NO EQUIVALENT
SHOW_SEC_SERVICES - NO EQUIVALENT


1. IN DB2 POSSTR IS A FUNCTION WHICH TAKES TWO ARGUMENTS POSSTR(
SOURCE_STRING EXPRESSION , SEARCH_STRING EXPRESSION) AND RETURNS AN
INTEGER WHICH DENOTES THE FIRST OCCURRENCE OF THE SEARCH STRING. IT
CAN BE USED FOR BOTH CHARINDEX AND PATINDEX FUNCTIONS OF SYBASE.

NOTE THAT IN DB2 , IN THE FUNCTION LOCATE THE STARTING POINT OF THE
SEARCH FROM WHERE THE SEARCH HAS TO BEGIN CAN ALSO SENT AS AN OPTIONAL
PARAMETER
LOCATE('I','POINT SOLUTION'[,6])

2. IN SYB THE FUNCTION STR TAKES THREE ARGUMENTS
STR(APP_NUM[,LENGTH[,DECIMAL]]) WHERE APP_NUM IS A FLOAT, REAL OR A
DOUBLE PRECISION NUMBER, LENGTH IS THE LENGTH OF THE DECIMAL PART AND
DECIMAL DENOTES THE LENGTH OF THE FRACTIONAL PART. BUT IN DB2 THE
FUNCTION CHAR(IN THIS CONTEXT) TAKES TWO ARGUMENTS CHAR( EXP, DECIMAL
CHAR) WHERE EXP IS AN EXPRESSION THAT RESULTS IN A DECIMAL NUMBER OR
A FLOATING POINT NUMBER AND DECIMAL CHAR IS THE CHARACTER THAT
DENOTES THE CHARACTER USED AS A DECIMAL POINT.

3. IN DB2 THE FUNCTION HEX CAN TAKE ANY BUILT I N DATATYPE AS ARGUMENT.
IN THIS CONTEXT WE CAN GIVE INTEGER EXPRESSION.

Nov 12 '05 #1
1 8285
db*****@gmail.com wrote:
All,

We have listed out the INBUILT Function differences between Sybase and
DB2.

Kindly provide your feedback or corrections and for CHANGES - DO WE
NEED TO CODE our own UDFs?

If you download the migration tool kit (MTK):
http://www-306.ibm.com/software/data/db2/migration/mtk/
it will come with a library of SQL and Java functions and I believe now
with source code for matching C UDF (C UDF are a lot faster).

If teh only difference between sybase and DB2 is the name you can use so
called "sourced" functions (function synonyms).
For fucntions that just provide a constant (PI) or are simple
expressions I recommend using SQL Functions.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Raquel | last post by:
We ran Migration toolkit to look into the possibility of migrating from SYBASE to UDB. The following statement in SYBASE: INSERT INTO GEST_TP ( GES_D, PC_N, IPD ) VALUES (
3
by: aww91 | last post by:
Need product information on IBM's Integration Integrator (I.I) for conversion of SyBase calls to UDB calls. Production allows for conversion of modules one-by-one and then when all modules are...
2
by: aww91 | last post by:
Company is planning a Sybase to UDB migration that is projected to take 1 year. During that long period of time any Code Freeze put into place would impact our users (we normally release code...
1
by: pankaj_wolfhunter | last post by:
Greeting, Can anyone tell me the points to keep in mind while migrating data from Sybase to DB2 especially in case of LOB data. I know the books available on the IBM site, but if still someone can...
2
by: pankaj_wolfhunter | last post by:
Greetings, Can someone recommend me some online redbooks or any link regarding "Migration from Sybase to Sql Server"? Any feedback will be appreciated TIA
2
by: pankaj_wolfhunter | last post by:
Greetings, Sybase authentication is managed by the database manager whereas DB2 relies on OS userid and password. when we migrate from sybase, there are certain applications that are using...
9
by: Troels Arvin | last post by:
At work, some people have found IBM's Migration Toolkit (MTK) to be a nice tool for copying data from one table (in another DBMS product) to DB2. Now, they want to do the same thing from one DB2...
2
by: donnadimeo | last post by:
We are migrating a 300gb Sybase DB to DB2. How much can we expect the DB to grow (if at all) as a result of the migration? Give me a number on the safe side. Thanks, Donna
1
by: aks reddy | last post by:
Did anybody worked on the migration from SYbase to UDB database or have any information. Please let me know with the details. Regards, Aks
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.