SQL & PL/SQL :: What Would Be The Sybase Str Equivalent In Oracle

Mar 4, 2010

What would be sybase str(approx_numeric [, length [, decimal] ]) equivalent in oracle.

Sybase call :

select str(10000.5555, 6, 3) as Test.

Tset
-------
10001

View 4 Replies


ADVERTISEMENT

SQL & PL/SQL :: Sybase To Oracle Conversion

May 6, 2010

I am converting sybase to oracle database. during the migration, i have small doubt in triggers.

sybase source

create trigger testss_dt
on test
for delete
as
if @@rowcount = 0
return
insert into test
select id from deleted
return

I have converted oracle code here

create or replace trigger testss_dt
before delete on test
for each row
begin
insert into test
values(:old.test);
end;

But i have ignores @@rowcount concepts in oracle. what @@rowcount indicates in trigger?

View 10 Replies View Related

SQL & PL/SQL :: Migrate Sybase To Oracle Conversion

Apr 23, 2010

i want to migrate sybase stored procedure to oracle stored procedure.

sybase stored procedure:

create proc checkcontract @titleid tid
as
delete from titile where titile_id=@titleid
return 0

we need to migrate this procedure to oracle stored procedure. If we are using return 0 in SP in oracle means, it returns the end of the procedure statements(according to oracle statements). but sybase indicates that return 0 does not return 0 value during the run time. The return 0 implies that SP completed successfully. In oracle, i have converted stored procedure into SP and also stored functions.

Oracle Scripts:
Stored Procedure:

create or replace procedure checkcontract(v_titile varchar2)
as
begin
delete from titile where titile_id=v_titleid;
end;
/

Stored Functions:

create or replace functions checkcontract(v_titile varchar2)
as
return number
begin
delete from titile where titile_id=v_titleid;
return 0
end;

Give the comments which one is correct or accurate.

Oracle SQL developer also recommeds STORED FUNCTION. But in my application code, don't assign any output variable to this procedure. If i am using Stored Functions, we need to assign value and assign the output of the SF. we don't want to change the application code.

View 4 Replies View Related

Zero Downtime Migration From Oracle To Sybase

Aug 3, 2012

Is there any way/ tool to migrate from oracle to sybase with Zero Downtime?

View 2 Replies View Related

SQL & PL/SQL :: Difference Between Sybase Raise Error And Rasie_application_error In Oracle?

May 6, 2010

I try to convert sybase raiseerror into oracle raise application error.

sybase code :

raiserror 20100 "can't add a contact number that's in the contact"

oracle

raise_application_error (
-20002, ':can''t add a contact number that''s in the contact');

the sybase error number 20100 unable to use in oracle due to the limitation of error number.RAISE_APPLICATION_ERROR should be negative and between -20000 and -20999.

how to use sybase error number in oracle?

View 2 Replies View Related

Replication :: Golden Gate - Replicate Data From Oracle To Sybase

Oct 17, 2007

Implemented the Golden Gate replication tool? In particular, to replicate data from Oracle to Sybase?

No details are needed, just a quick nod indicating "yes, it has been done successfully".

View 1 Replies View Related

SQL & PL/SQL :: Left Function Equivalent In Oracle 9i

Dec 22, 2006

Is there is an equivalent to the 'LEFT' Function of SQLServer in Oracle9i?

View 10 Replies View Related

PL/SQL :: Find Equivalent Of Mysql_data_seek In Oracle

Oct 23, 2012

"php 5.3.x + oracle 11g R2 XE 11.2.x.x"...I'm quite new to oracle (2-4 months) and php(2 weeks).I have one query with results that needs to be reused in several parts of my website. I can't seem to find the equivalent of the mysql_data_seek in Oracle. I wanted to reset the cursor/pointer of oci_ fetch ($result) so that I can scroll the result again.So far this are what I have come up:

A. On first fetch put the the results in a php array and call the array later on.
B. Do the query again.
C. Keep on looking for a mysql_data_seek equivalent and fail.

I'm leaning towards option 'A' but I just wanted to consult the experts.

View 4 Replies View Related

SQL & PL/SQL :: Date Diff (Month Not Day) Equivalent In Oracle

Jun 16, 2010

I see month aging buckets in the Oracle Application I am using (Keystone time and billing). I need to do a query in directly in Oracle (Toad front end to Keystone database) using month aging buckets . I use the following in Access that matches the results in Oracle, but I need to work directly in Toad because I want to avoid having to bring over all the dates when I want to summarize by buckets.:

2-4 Months: Sum(IIf(DateDiff("m",[invoice date],forms!Reporting_Standard!txtlastdayofmonth) In (2,3),[Outstanding Gross],0))

I know about getting the difference between two dates and that works fine for day aging buckets, but I need months, which can deal with months that are different sizes.

View 3 Replies View Related

SQL & PL/SQL :: How To Get Java Nano-time Equivalent In Oracle

Dec 11, 2011

how to get java nanotime equivalent in oracle

View 2 Replies View Related

Server Utilities :: Migration From Sybase To Oracle 1 Table Fails With SQL Error ORA-01841

Jul 17, 2012

im trying to migrate Sybase 12.5 to oracle 11G R2 on linux all tables are fine expect one which fails with error

"SQL Error: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
01841. 00000 - "(full) year must be between -4713 and +9999, and not be 0"
*Cause: Illegal year entered
*Action: Input year in the specified range"

i have change the data type from CHAR to VARCHAR2 etc as for the datatype date shows as date on the tool - I'm using sqldeveloper from oracle.

View 8 Replies View Related

Security :: Moving Application Security To Oracle From Sybase

Aug 18, 2010

In Sybase, my application was using system tables to perform application login security. Those tables obviously don't exist in Oracle. I am looking for ways to provide the following functionality in an Oracle world:

1. How to determine 'x' days of inactivity based on "last login date"?

2. How to determine when a new user logs in for the first time and force them to change their password?

3. If we need to reset a users password, how can we require the user to change their password?

4. Is there any other option other than storing a user-id/password in the application code for locking a user's account if their account needs to be locked due to inactivity?

5. In the USER_USERS view there is a status column. What the different status's can be?

View 3 Replies View Related

Client Tools :: Error When Trying To Connect Sybase Through SQL Developer

Nov 17, 2012

I am getting bellow error message when trying to connect Sybase through Sql developer: status:failure-test failed:IO Error:The network adapter

View 1 Replies View Related

Networking And Gateways :: Can't Connect To Sybase (ASA) Via Database Gateway

Sep 6, 2009

I'm trying to connect from Oracle 11g (11.2.0.1.0) to Sybase Adaptive Server Anywhere (9.0.2.3527). My Oracle environment is running on Linux Centos 5.3, the sybase database runs on a Windows Server.

All my attempts have failed so far - both through Oracle Database Gateway for Sybase and via Oracle Database Gateway for ODBC in combination with freeTDS. Using either way I'm ending up with apparently the same error:

ASA Error -611: Transact-SQL feature not supported

When I use db link created via dg4sybs (Oracle Database Gateway for Sybase) I get this:
SQL> SELECT * FROM aaa@hvx;
SELECT * FROM aaa@hvx
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:

[code]....

When I use db link created via dg4odbc (Oracle Database Gateway for ODBC) and freeTDS driver I get this:

SQL> SELECT * FROM aaa@hvx1;
SELECT * FROM aaa@hvx1
*
ERROR at line 1:
ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=ORA-28511: lost RPC connection to heterogeneous remote agent using

[code]....

It seems both drivers use Transact-SQL instructions which are then denied by ASA. I'm not familiar with Sybase products at all, but as far as what my googling revealed the Transact-SQL is only supported in Adaptive Server Enterprise (enterprise-class version of Sybase's database). I couldn't figure out if there's a way how to disable Transact-SQL in the driver configuration. how to connect from Oracle (10g or 11g) to Sybase Adaptive Server Anywhere?

View 3 Replies View Related

SQL & PL/SQL :: Hexadecimal Equivalent

Jun 16, 2011

I need to get the output as ú (Lowercase U-acute) using oracle sql.

SQL> select UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('<x>')) from dual;

where <x> represents the hexadecimal equivalent for the character 'ú' ,

View 3 Replies View Related

PL/SQL :: Top N Percent Equivalent

Jul 16, 2013

what is the equivalent of Top n Percent in Oracle sql 11g. Here is my requirement:

I have to find stores contributing top 20% of sales: Store Sales PercetageABC200(200/380)*100=52%XYZ100(100/380)*100=26%PQR50(50/380)*100=13%dddd20(20/380)*100=5%rrrr10(10/380)*100=2% 

In the above example I have to get only store ABC as this store alone is contributing more than Top 20%If I change the requirement to Top 70% I have to get store's ABC and XYZ.

View 6 Replies View Related

Upgrade :: 10g Companion CD Equivalent In 11g?

Sep 25, 2013

I am upgrading from 11.2.0.1 to 11.2.0.3 (64 bit) on Windows (64 bit)  I planned to install Oracle 11.2.0.3 on new home and i am not sure wheteher i have to install:  Oracle Gateway and Oracle Examples on the 11.2.0.3 new home.  I am not using any non - oracle so i may not need Oracle Gateway.  I am not sure about examples media . Does it have only examples to learn (or)will it have any optional components which we may require (like companion CD in 10g)?    What about the ODBC and com components will it be installed with the database media itself?  After DB upgradation is it possible to install oracle gateway/examples on the same home?

View 2 Replies View Related

SQL & PL/SQL :: Send Again Function Of Equivalent Of DATEADD

Apr 19, 2011

Is it possible to send again the function of equivalent of DATEADD in sql for plsql??

View 3 Replies View Related

SQL & PL/SQL :: Query Must Return All Equivalent Records

Nov 26, 2012

I've stucked with a query. I have a table that i store the IDs of logically equal records.

For example;
A = B
B = C
X = Y
Z = Y

My query must return all equivalent records. If you call the query with parameter 'A', the result set must contain B and C. And if you call the query with parameter 'Y', the result set will contain X AND Z. I have thought that i can write the query wity using start with connect by statement. But the query does not work as i expected. Here is my code and sample data:

create table temptable (ID1 number,ID2 number);/

insert into temptable values(11,12);/
insert into temptable values(12,13);/
insert into temptable values(13,14);/
insert into temptable values(13,15);/

SELECT distinct ID1 from
(
SELECT * FROM temptable
START WITH ID1 = 13 OR ID2 = 13
CONNECT BY NOCYCLE
(
(PRIOR ID1 = ID1) OR
(PRIOR ID1 = ID2) OR
(PRIOR ID2 = ID1) OR
(PRIOR ID2 = ID2))
) WHERE ID1 <> 13
union
[code]....

When i call the query with parameter 13, i'm expecting to get 11,12,14,15. But it returns only 12,14 and 15.

View 7 Replies View Related

SQL & PL/SQL :: Getting Equivalent DECODE For CASE Statement?

Feb 21, 2013

case when age <= 17 then '<= 17'
when age >= 40 then '>= 40'
else to_char(t.age)
end age

the case statement above doesn't work in my 8.1.7 cursor statement within my pl/sql block so I need an equivalent decode

View 10 Replies View Related

Query To Get IST equivalent Time

Mar 20, 2013

My requirment is something like below.

My Oracle DB server time is in UTC. which lags by 9:30 mins to IST.how to get tHe IST time (Asia/Kolkotta) time for that UTC timezone? I can not hard code +9:30 to UTC as this difference varies as per Daylight savings every 6 months.

View 3 Replies View Related

Replication :: What Is Stream's Tag Equivalent In Golden Gate

Apr 13, 2012

What is the stream's "tag" equivalent in Golden gate ?My tables are already in GG replication, but i want to do few insert in to source which i dont want to replicate to target.

View 1 Replies View Related

PL/SQL :: Save Exceptions Clause Or Equivalent For Insert As Select Statement

Jan 29, 2013

Is there a save exceptions clause or an equivalent for an Insert as select* statement ?

How do I trap the errors in the below statement -

INSERT INTO copy_emp
SELECT * FROM emp;

Is it an all or nothing scenario ?

View 10 Replies View Related

Security :: How To Configure Oracle EM With Newly Created Oracle Instance On 10g DB

Dec 11, 2012

How to configure Oracle EM with newly created Oracle Instance on Oracle 10g DB,which is Single Instance DB but not RAC ,when I start the Oracle EM it is starting the default DB which created during Oracle Server Installation.

View 0 Replies View Related

Networking And Gateways :: Oracle Database Gateway Installing On Oracle 8?

May 17, 2011

But i do a lot of work-arounds to make sure the installation does not make corrupt my OracleAgent,OracleService and OracleDataGatherer. If i just let the installation do its thing i have problems with my libraries, and can't start anything.

The errors are : Procedure entry point 'BlaBla' could not be located in the Dynamic Link library 'AnyName'.

I notice that i have 2 versions of the libraries in OracleHomeBIN (one version 8, one version 11). The programs that start the OracleAgent,Service and DataGatherer call the old libraries but expect to find values that can be found only in new libraries.

View 1 Replies View Related

PL/SQL :: Oracle SQL Template To Create Re-usable DDL / DML Scripts For Oracle Database

Jun 13, 2012

I have a requirement to put together a Oracle SQL template to create re-usable DDL/DML Scripts for Oracle databases.Only the Oracle DBA will be running the scripts so permissions is not an issue.

The workflow for any DDL is as follows:-

1) New Table

a. Check if the table exists from the system/admin views.

b. If table exists then give message "Table Exists"

c. If table does not exist then execute DDL code

2) Add Column

a. Check if Column exists for a given table from system/admin views

b. If column exists in the specified table,

b1. backup table.

b2. alter table to make changes to the column

b3. verify data or execute dml script convert from backup to the new change.

c. If Column does not exist

c1. backup table

c2. alter table to add column

c3. execute dml to populate column with default value.

The DML scripts are for populating base tables with data required for business operations.

3) Add new row

a. check if row exists by comparing old values of each column with new values to be added for the new record.

b. If exists, give message row exists

c. If not exists, add new record.

4) Update existing record (We have createtime columns in these tables so changes can be tracked)

a. check if row exists using primary key.

b. If exists,

b1. deactivate the record using the "active" column of the table

b2. Add new record with the changes required.

c. If does not exist, add new record with the changes required.

View 17 Replies View Related

Moving Oracle 11g UNIX Sun Solaries To Oracle 11g Linux Readhat OS

Aug 8, 2012

We would be moving oracle 11g unix sun solaries to oracle 11g Linux readhat OS. what would be the disadvantage and what are the item needs to be verified. Basically advantage of oracle 11g Linux readhat OS.

View 2 Replies View Related

JDeveloper, Java & XML :: Update Xml Element In Oracle 10gr1 Without Using Oracle XDB

Jun 27, 2013

I would like to update an XML element without using the function APPENDCHILDXML or INSERTCHILDXML because they are not available in Oracle 10GR1.
In my database, Oracle XDB is not installed.

The following query fail with the following error : ORA-00904: "INSERTCHILDXML" : identificateur non valide

update scl_profile
set profile_data =
insertChildXML(profile_data,'/exportImportMarcheCriteria','colonnesExport',
XMLType('<colonnesExport>ENTETE_GESTIONNAIRES_AUTORISES</colonnesExport>'))
where profile_xmltype =
'fr.mipih.marches.marche.criteres.ExportImportMarcheCriteria'
and profile_type =
'eMagh2.MRGS.AccesMarche.ListeMarche.Export.OptionsExportImport';
[code]........

If i try to use the package DBMS_XMLDOM, i have the following error :

ORA-06550: Ligne 3, colonne 11 :
PLS-00201: l'identificateur 'DBMS_XMLDOM.DOMDOCUMENT' doit etre declare
ORA-06550: Ligne 3, colonne 11 :
PL/SQL: Item ignored

I think it's because ORACLE XDB component is not installed in my database.

View 1 Replies View Related

Application Express :: Downloading Oracle 11g And Then Oracle APEX

Aug 7, 2012

This time i am downloading the Oracle 11g and then the Oracle APEX...(they are not in one package...right ? i mean they both have to download separately)i really new in oracle / PL/SQL. I'm not a programmer but i interest about database programming.For now i still use Ms. Access to develop an aplication and i really suprised i found this Oracle APEX because it an RAD tool too same as Access but more powerfull i think.

View 2 Replies View Related

Connect To Oracle From Another Server That Does Not Have Any Oracle Applications On It

Mar 7, 2007

I am trying to connect to Oracle from another server that does not have any Oracle applications on it.

I tried Perl, PHP, Java but each require parts of Oracle installed.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved