Table of ContentsPreviousNext

Ispirer
Please, note, that Ispirer SQLWays 6.0 is no longer supported and provided to clients.
You can try out automated conversion of databases and applications with Ispirer Toolkit for free. Download free trial.
Check out the relevant toolkit documentation.
Ispirer MySQL to Oracle Migration overview.


Ispirer SQLWays Database Migration Software

Conversions of Microsoft SQL Server CHARINDEX to Oracle

The CHARINDEX function is used in Microsoft SQL Server to retrieve the position of a substring in the specified string. Oracle uses with this purpose the INSTR function. These functions have a similar syntax and differ in the parameter order.

SQLWays converts the Microsoft SQL Server function CHARINDEX to the Oracle function INSTR.

TABLE 63. Examples of Conversions of Microsoft SQL Server CHARINDEX to Oracle
Microsoft SQL Server
Oracle
CREATE PROCEDURE sql_sp_charindex
as
begin
DECLARE @a VARCHAR(10)
DECLARE @b VARCHAR(10)
charindex (@a,@b)
end;
CREATE OR REPLACE PROCEDURE sql_sp_charindex
AS
v_a VARCHAR2(10);
v_b VARCHAR2(10);
BEGIN
INSTR(v_b,v_a);
end;
CREATE PROCEDURE sql_sp_charindex2
as
begin
DECLARE @a VARCHAR(10)
DECLARE @b VARCHAR(10)
charindex (@a,@b,1)
end;
CREATE OR REPLACE PROCEDURE sql_sp_charindex2
AS
v_a VARCHAR2(10);
v_b VARCHAR2(10);
BEGIN
INSTR(v_b,v_a,1);
end;
 


Table of ContentsPreviousNext
Copyright 1999-2023 Ispirer Systems.
Ispirer and SQLWays are registered trademarks. All other product names may be trademarks of the respective companies.
All rights reserved.