oracle10g

More Efficient Way To Merge Unique Values From Dynamically Selected Tables using Oracle PLSQL

霸气de小男生 提交于 2019-12-07 21:44:45
问题 Given a declared PLSQL Procedure PROCEDURE GET_DISTINCT_TIMES(dtypes IN VARCHAR2, start IN NUMBER, end IN NUMBER distinct_times_cursor OUT SYS_REFCURSOR) Where: 'Dtypes' is a comma delimited string, with each value corresponding to a general type of data I want to retrieve. One data type may correspond to one or many different tables where distinct times need to be retrieved 'Start' & 'End' are the two times I am querying between I have written implementations that dynamically create the SQL

C# and Oracle 10g database to call stored procedure

霸气de小男生 提交于 2019-12-07 20:00:21
问题 I am a C# + SQL server database developer. Now I am using Oracle as a database. I have one Oracle stored procedure retuning ref cursor. CREATE OR REPLACE PROCEDURE Get_Trans_Data ( p_return_cur OUT SYS_REFCURSOR) IS BEGIN OPEN p_return_cur FOR select * from test_tbl1 ; END Get_Trans_Data; Using Oledb only how can I access this stored proc and save result in dataset? I am not get the option for ref cursor datatype in Oledb. 回答1: You can try something like this. No need to add parameter for OUT

Converting integer value from a db column to text in oracle

那年仲夏 提交于 2019-12-07 19:01:14
问题 I have a requirement in db. 1).Table ABC, column: check_amount number number(18,4) . This basically contains check amount for eg. 3000.50 to be paid to an employee. Now a cheque is issued and that check contains this check_amount in number as well as in text form.for eg.check will have: pay to <emplyee_name> ****$3000.50**** ****THREE THOUSAND DOLLARS AND FIFTY CENTS**** I have to generate this text using DB column value and display that on check. Can anybody help me out, how can i achieve

ORA-12154: TNS:could not resolve the connect identifier specified

孤者浪人 提交于 2019-12-07 16:20:54
问题 The issue started when i installed the server version with already existing client version of Oracle 10g. Background : The Oracle client version 10g was installed (at c:/oracle) to connect to a database residing in other country. So we can just connect to it and have limited access to it. Path => c:/oracle/ora_client/network/admin/listener.ora So to work as admin I installed 10g server at the same location c:/oracle on windows. I can now work as server. Path => c:/oracle/product/db_1/network

Using WMSYS.WM_CONCAT with Oracle XE 10g

给你一囗甜甜゛ 提交于 2019-12-07 15:53:36
问题 When I try to use WMSYS.WM_CONCAT with Oracle XE 10g, I receive a compilation error: ORA-00904: "WMSYS"."WM_CONCAT": invalid identifier . Can anyone verify that this is indeed due to XE lacking this (undocumented) feature? If so, is there anyway to enable it in XE? 回答1: I had found a couple reference sites, but had no luck enabling it. I ended up writing my own function to handle the concatenation. CREATE or replace FUNCTION CONCAT_LIST( cur SYS_REFCURSOR, sep Varchar2 ) RETURN VARCHAR2 IS

Settings of connection timeout for Oracle database

≡放荡痞女 提交于 2019-12-07 14:48:01
问题 For some period time of inactivity, connection to oracle database are dropped and this leads to error - > end-of-file on communication channel . 1) Is there any oracle settings on client machine (sqlnet.ora or some kind of environment variables) which could specify connection timeout and differs from client to client ? Or it could be client settings of some "heartbeat" feature (client sends packets in some interval), which prevent connection to be dropped by firewall ? 2) Where I can find

Recursively list concents of Oracle's DBA_DEPENDENCIES view

佐手、 提交于 2019-12-07 13:00:15
问题 I would like a list of dependent tables (ultimately) of a given view. For example: SELECT NAME, TYPE, REFERENCED_NAME, REFERENCED_TYPE FROM DBA_DEPENDENCIES WHERE OWNER='FOO' AND NAME='VIEW_O1' The results: VIEW_O1 VIEW TABLE_01 TABLE VIEW_O1 VIEW TABLE_02 TABLE VIEW_O1 VIEW TABLE_03 TABLE VIEW_O1 VIEW VIEW_02 VIEW VIEW_O1 VIEW VIEW_03 VIEW I would like it to resemble: VIEW_O1 VIEW TABLE_01 TABLE VIEW_O1 VIEW TABLE_02 TABLE VIEW_O1 VIEW TABLE_03 TABLE VIEW_O1 VIEW VIEW_02 VIEW VIEW_O1 VIEW

Connecting C# app with Oracle 10g: ORA-12154: TNS:could not resolve the connect identifier specified

时光毁灭记忆、已成空白 提交于 2019-12-07 12:00:57
问题 I am a beginner in working with databases. I am trying to access Oracle10g database from a c# application. But when I do so i get this error: ORA-12154: TNS:could not resolve the connect identifier specified" I'm using the following code: string oradb = "Data Source=ORCL;User Id=system;Password=goodbye;"; OracleConnection conn = new OracleConnection(oradb); // C# conn.Open(); Is there an error in the connection string oradb ? 回答1: Start the Visual Studio , open View menu + Server Explorer.

How to do SQL injection on Oracle

ぃ、小莉子 提交于 2019-12-07 10:50:08
问题 I'm doing an audit of a system, which the developers insist is SQL injection proof. This they achieve by stripping out the single-quotes in the login form - but the code behind is not parameterized; it's still using literal SQL like so: username = username.Replace("'", ""); var sql = "select * from user where username = '" + username + "'"; Is this really secure? Is there another way of inserting a single quote, perhaps by using an escape character? The DB in use is Oracle 10g. 回答1: Have a

Invalid Number Error! Can't seem to get around it

二次信任 提交于 2019-12-07 08:19:05
问题 Oracle 10g DB. I have a table called s_contact . This table has a field called person_uid . This person_uid field is a varchar2 but contains valid numbers for some rows and in-valid numbers for other rows. For instance, one row might have a person_uid of '2-lkjsdf' and another might be 1234567890. I want to return just the rows with valid numbers in person_uid. The SQL I am trying is... select person_uid from s_contact where decode(trim(translate(person_uid, '1234567890', ' ')), null, 'n', 'c