oracle11g

PL/SQL functions [duplicate]

泄露秘密 提交于 2019-12-11 18:44:06
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Homework on PL/SQL FUNCTIONS plsql functions Function: function to Display_Employee_Name_In_Uppercase that accepts the Employee_ID from the Empoyees table and returns the first and the last name of the employee in uppercase. Write a small PL/SQL program to display the names of the employees whose Employee_IDs are 107, 200 and 205. this is what I have done I didnt know how to complete it can help ? CREATE OR

Oracle Web Services Security: WSSecurity sign throws NoSuchMethodError. How to find library issue

女生的网名这么多〃 提交于 2019-12-11 18:37:59
问题 I am working with an Oracle 11g database (thus JDK 1.5) and trying to call a webservice with SOAP. I have to use ws-security, so I followed this documentation: http://docs.oracle.com/cd/E15523_01/security.1111/e10037/wss.htm I did everything in the document, and it works locally (using Netbeans JDK 1.5). But when I try to run it on the Oracle 11g database (using SQL Developer), it throws a java.lang.NoSuchMethodError on the sign method of WSSecurity. I use the same libraries at both locations

TOAD connects despite the db name not being present in tnsnames.ora

纵然是瞬间 提交于 2019-12-11 18:35:51
问题 I went in TOAD and put in the TNS name for a db that was supplied to me by the DBA. I also put in the user and password and it connected fine. My confusion is that the tnsnames.ora file does not have any entry corresponding to that db name. So how is TOAD resolving the DB name? 回答1: In your Oracle client, the ldap.ora file can list one or more ldap server names, which can be queried to get the Oracle instance info for the given TNS name. This way, TOAD (and other apps) can resolve Oracle

Oracle - How to add a Record to a Collection of the same Type (Multiset Union)

北战南征 提交于 2019-12-11 18:30:45
问题 I have used MULTISET UNION in order to load a collection into another collection of the same type however I am now working with Records and want to add a Record into a Collection of the same Type. For whatever reason I just can't figure out the appropriate syntax or simply the proper way to do this as MULTISET UNION appears to not play nice with Records in the way I'm used to working with Collections. I've added a summary of how this code works at the end (supposed to work anyway). Screenshot

Extract data from a XML and load it into a table

喜欢而已 提交于 2019-12-11 18:24:44
问题 How would I fetch the data from a XML (loaded into a Oracle table) and create a table to load that extracted data. I'm trying to create a table, with columns as follows, the below mentioned columns are tags in the xml ID, Provider_Name, Index, Provider_ID_description, Provider_ID 1, Provider_P107, 1, GNRCN, GNRCN 1, Provider_P107, 2, INDF1, INDF1 2, Provider_EGUT, 1, EGUT, EGUT The XML is: <?xml version="1.0" encoding="us-ascii"?> <AuxiliaryType auxiliaryTypeId="1617309" base="Value list"

Inserting data in table using UTL

为君一笑 提交于 2019-12-11 18:19:47
问题 friends i had written a code to upload a data in newemp table using UTL code i given below but i get the error 1 declare 2 EMPNO NUMBER(4); 3 ENAME VARCHAR2(10); 4 JOB VARCHAR2(10); 5 MGR NUMBER(4); 6 HIREDATE DATE; 7 SAL NUMBER(7,2); 8 COMM NUMBER(7,2); 9 DEPTNO NUMBER(2); 10 line varchar2(100); 11 namesfile UTL_FILE.FILE_TYPE; 12 begin 13 namesfile :=UTL_FILE.FOPEN('DIPRJDIR','empdata.txt','R'); 14 loop 15 UTL_FILE.GET_LINE(namesfile,EMPNO,4); 16 dbms_output.put_line('EMPNO :' || EMPNO); 17

How do I use ASP.NET Membership Provider with Oracle?

做~自己de王妃 提交于 2019-12-11 18:09:17
问题 I am developing an ASP.NET Application in .NET 3.5 with a back end of Oracle 11g. All the examples that I am finding need Oracle.Web.dll What install has this file and is there an example somewhere for .NET 3.5? Thanks, Greg 来源: https://stackoverflow.com/questions/10643456/how-do-i-use-asp-net-membership-provider-with-oracle

delete query for oracle table taking a infinite amount of time using python

烂漫一生 提交于 2019-12-11 17:55:29
问题 This is my piece of code: my_dsn_tns= cx_Oracle.makedsn('xyz', 1521, sid = 'SAMPLE') connection =cx_Oracle.connect(user='username',password='pass', dsn=my_dsn_tns) cur = connection.cursor() cur.execute("delete from SPS_CX_ONHAND_QTY") I am using python to delete all the records from a oracle table but this code is not showing any results nor any error. The time I hit run, it just goes in an infinite loop. I have no idea what the problem is all about. 来源: https://stackoverflow.com/questions

Oracle query to get the number of business days between 2 dates

半世苍凉 提交于 2019-12-11 17:44:10
问题 We are using Oracle 11. In our CASE WHEN statement, I need to check if the number of days between the 2 dates are > 3 business days (so excluding weekends and holidays). So, if Date1 = 1/21/19 (Monday) Date2 = 1/18/19 (Friday) The number of business days in between Date1 and Date2 is 1 day, not 3 days. CASE WHEN TO_DATE(SETTLEMENT_DATE, 'YYYY-MM-DD') - TO_DATE(TRADE_DATE, 'YYYY-MM-DD') > 3 THEN 0 --> this includes weekend and holidays WHEN CODE = 1 THEN 1 WHEN CODE =2 THEN 2 ELSE 3 END AS

Trigger in Oracle to auto-increment a field and insert into association table

本秂侑毒 提交于 2019-12-11 17:34:47
问题 I have a one-to-many relationship between two tables: table1: NUMBER users_id (primary key) field2 field3 ... table2: NUMBER users_id (foreign key) VARCHAR2 name ... ... and when I INSERT into table1 , I want to auto increment (sequence?) users_id and insert a number of records into table2 all with the same users_id so I end up with table1: 1,val1,val2 table2: 1,barry,... 1,bob,... 1,james,... I think I need a trigger with a sequence to auto-increment users_id in table1 and create the rows in