473,765 Members | 2,086 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
CURUNRESERVEDPG S - 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_SERVIC ES - 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','POI NT 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 8326
db*****@gmail.c om 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
1929
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
1421
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 converted the database (SyBase) can be converted and I.I removed. Last I heard the product was in beta. Any information would be appreciated...
2
1906
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 changes once a month). Any suggestions on how to manage a partial code freeze while under going a major migration like this one?
1
2068
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 provide me their own specific points? Any help will be appreciated. TIA
2
1449
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
1241
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 userid and password stored in sybase system tables. of course these are not OS based userid/password. now when we migrate to DB2 it checks for these userid/passwords as OS related. but these are stored in Sybase system tables.
9
4202
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 database to another DB2 database. - But MTK (surprisingly) doesn't seem to support DB2-DB2 copies. These are non-regular, ad-hoc tasks, performed by users without administrative rights (and generally somewhat annoyed by command line...
2
2262
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
2018
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
9566
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10153
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9946
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8830
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5272
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5413
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3530
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.