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
ADVERTISEMENT
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
View Related
Dec 22, 2006
Is there is an equivalent to the 'LEFT' Function of SQLServer in Oracle9i?
View 10 Replies
View Related
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
Dec 11, 2011
how to get java nanotime equivalent in oracle
View 2 Replies
View Related
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
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
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
Apr 19, 2011
Is it possible to send again the function of equivalent of DATEADD in sql for plsql??
View 3 Replies
View Related
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
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
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
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
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
Sep 5, 2010
I'm connecting from SQL Server to ORACLE (ORACLE is linkedserver) and I'm trying to find out when ORACLE started and how long it has been running. Is there query or command in ORACLE that I can use to check this? Is there more than one option to find this out and is it same for all ORACLE versions or diffferent from version to version?
View 1 Replies
View Related
Nov 1, 2011
how can i get full path in oracle 6i???
View 2 Replies
View Related
Feb 8, 2011
somebody has created the table , who had created the table Note: not required the schema name,
View 4 Replies
View Related
Apr 20, 2012
how can i find the oracle patch on os window. oracle 10.2.0.1
i m using sql>opatch lsinventory but cant work.
View 10 Replies
View Related
Jul 29, 2011
find the recent SQL history from Oracle 11. could the following SQL retrieve all SQL history happened in last 5 mins?
SELECT h.user_id,
s2.username,
h.sample_time,
s1.sql_text
FROM v$active_session_history h,
v$sqlarea s1,
[code]....
View 3 Replies
View Related
Jan 25, 2013
clould you sand me sqary for find high cpu user in oarcle 10g
View 3 Replies
View Related
Jun 4, 2013
I have a stat table that got info like login_date,user_id etc.For a specific user, i have a requirement based on the no of days difference between the current login date and last login date.
For example, Tom logged in on June 4th 2013. His previous login was May 31. So no_of_days_difference is 5 days.How to programmatically get this for each user inside a pl-sql sub block.
View 2 Replies
View Related
Aug 10, 2012
Database version
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for HPUX: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
I have this query
select dept_id,qc_subtype_id,equip_code,drive_id
from
(select distinct dept_id,
decode(qc_subtype_id,
[code]...
View 3 Replies
View Related
Mar 26, 2008
I want to find out the oracle client version on a particular server. How can I do that? I used to know some files to look at, and part of the file name indicated the version #, but it's been too long and I don't remember which files they are.
View 2 Replies
View Related
Jan 23, 2013
How to find the oracle form development tool in oracle 9i?
View 1 Replies
View Related
Jul 15, 2011
I am trying to patch an Oracle 11g database. I can see from the logs that is was patched after it was created by a consultant but I cannot get Opatch to work.
C:\app\Oracle\product\11.2.0\dbhome_1>java -version
java version "1.5.0_17"
Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_17-b03)
Java HotSpot™ Client VM (build 1.5.0_17-b03, mixed mode)
C:\app\Oracle\product\11.2.0\dbhome_1>opatch>set ORACLE_HOME=C:\app\Oracle\product\11.2.0\dbhome_1
C:\app\Oracle\product\11.2.0\dbhome_1>opatch lsinventory -all
ORACLE_HOME is NOT set at OPatch invocation
The Oracle Home C:\app\Oracle\product is not OUI based home. Please give proper Oracle Home.
OPatch returns with error code = 1
OPatch failed with error code = 1
Java is set in the environment path but the Oracle home seems to be the issue. I checked the LOC parameter in the Oracle/Inventory folder and it is set correctly to C:\app\Oracle\product\11.2.0\dbhome_1.
View 3 Replies
View Related
Oct 14, 2013
I would like to write a select that would return all places in DB that are commiting transaction.
E.g. package for testing:
CREATE OR REPLACE PACKAGE test.TEST_COMMIT AS
PROCEDURE THE_ONLY_COMMIT_IN_DB ;
END TEST_COMMIT;--not a match
CREATE OR REPLACE PACKAGE BODY test.TEST_COMMIT AS
[code]....
The select should return 4 rows with --ok.
SELECT *
FROM ALL_SOURCE ASO
WHERE
REGEXP_LIKE(ASO.TEXT,'commit(s*);','i' )
AND name = 'TEST_COMMIT'
View 18 Replies
View Related
Dec 14, 2012
we need to find the key pressed action and key release action on Oracle form 10g. On key pressed (i.e. key-up, key-down, key-page-up and key- page-down) the event will be fired and as soon as the user release the key, the event will be stop.
As current situation, we have one form which contains the database blocks. As per search condition, all the data populated in Database block, there are 1000 and more records. Now user going use any of key (i.e. key-up, key-down, key-page-up and key-page-down) as he pressed key ( say Key- down) it scrolled down but as soon as he release the key, the event is not stopped. its going on going down then stop.
Is it possible, as user release the key scrolling will stopped at same time ?
View 3 Replies
View Related
Jun 19, 2013
Last week we have realized that a user who connects through SQL Developer(as nothing wrong found in application server logs) has made a serious change in the database which created a real mess. The user has done some mischief in some calculations by making some inserts and updates in some important tables in our production database.
How can I find which user or from which IP the change is made.
View 6 Replies
View Related
Feb 1, 2013
I have a schema DEF and I have a column_name CREATE_DATE.
I wanted to write a procedure which will give me list of tables whose CREATE_DATE data is prior to year 2009.
View 5 Replies
View Related
Dec 9, 2010
findout and to fill up the excel which lists down the Database schemas and states whether they have in active / or not.
Active state may be determined whether it has been used for the last 3 months or so. The last updated time may be a good indicator of the same.
View 2 Replies
View Related