oracle11g

Rollback database changes using implicit savepoints? - Oracle

你。 提交于 2019-12-13 03:37:13
问题 Can I rollback changes to the database using implicit savepoints? I ended up making changes( INSERTs ) through my Java code that I would want to revert back. 回答1: You can use a SAVEPOINT as outlined at How to COMMIT, ROLLBACK Oracle Transactions. Here's the SAVEPOINT snippet from it... SAVEPOINT Specify a point in a transaction to which later you can roll back. Example insert into emp (empno,ename,sal) values (109,’Sami’,3000); savepoint a; insert into dept values (10,’Sales’,’Hyd’);

How can I extract only the error message from xml result

半腔热情 提交于 2019-12-13 03:29:18
问题 How can I extract the value from the label VertexApplicationException and User login failed. from below xml result? Inside my package, i am using 'make request api' call to get tax value calculated from vertex, sometimes i am getting error as response for my api call, now i need to store the response in table but only i need the error message ex: VertexApplicationException and User login failed. from the belowgiven xml response tag <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope

how to query a many to many for the absence of records using EF5

痞子三分冷 提交于 2019-12-13 03:18:27
问题 Assuming a pure many to many where the primary key is the composite of two foreign keys. For example "Employee Privileges" in Northwind has EmployeeID and PrivilegeID. This m2m obviously relates the Employees table to the Privilege table. I need to write a query with EF that returns all Employees that are NOT associated with a specified PrivilegeID, regardless of whether or not it is related to other PrivilegeIDs. I have an EF query that works for Sql Server using Except() but it doesn't work

Oracle SQL: Find duplicate CLIENTKEY and show one specific record

ⅰ亾dé卋堺 提交于 2019-12-13 03:14:24
问题 I have following table: CLIENTKEY CLIENTNAME DEPARTMENT HOSTKEY 0201967/6 PPBOP1BOP01-JO,BLOGS KB PPBOP1BOP01/MSC/PPBOP1BOP01/2/B1KI0 0201967/6 PPBOP1BOP01-JO,BLOGS BS PPBOP1BOP01/MSC/PPBOP1BOP01/2/B1KI0 0024028/2 PPBOP1BOP01-FOO,BAR KB PPBOP1BOP01/MSC/PPBOP1BOP01/2/B2KI0 0024028/2 PPBOP1BOP01-FOO,BAR BS PPBOP1BOP01/MSC/PPBOP1BOP01/2/B2KI0 1746947/1 BSM1BSM03-THING,BOB BS BSM1BSM03/BSHVS/BSM1BSM03/2/B1KI0 1612105/1 WIBU1IBU03-TREE,GREEN BS WIBU1IBU03/SHVS/WIBU1IBU03/3/B1KI0 The output I'm

Oracle DB: Suggestion for Email Trigger

安稳与你 提交于 2019-12-13 03:13:46
问题 Can someone provide a link or an example of an Oracle DB trigger that sends an email if a specific column in the table gets updated AND updates a different column in the same table? Example: A table has multiple issues and there are two columns 'Issue Added' and 'Email Sent' that default to '0' Issue Added Email Sent 0 0 When the 'Issue Added' column gets updated to '1' Issue Added Email Sent 1 0 Trigger sends email and updates column 'Email Sent' Issue Added Email Sent 1 1 回答1: It would

Execution of Oracle Ad Hoc query with Bind Parameters Erroring Out; ORA-00907: missing right parenthesis

牧云@^-^@ 提交于 2019-12-13 03:07:01
问题 I'm trying to execute an ad hoc query with a parameter (bind variable) using Visual Studio 2010 (.NET 4.0) and ODP 4.112.3.0, Oracle11g. It's operating in a 32 bit application pool under ASP.NET. I have the following code: Public Shared Function LookupUpc(ByVal upc As Long) As DataTable Dim upcLookup As New DataTable Dim sql As String = "OPEN :outCursor FOR SELECT * FROM IMPROD.UPC_ID_XREF " + _ "INNER JOIN IMPROD.UPC_ID_DESCRIPTIONS ON IMPROD.UPC_ID_XREF.UPC_ID = IMPROD.UPC_ID_DESCRIPTIONS

hide the 'Create' button if P_Photo is null and P_mandatory photo = Yes

喜你入骨 提交于 2019-12-13 02:56:00
问题 who can help, I have made an add-on to the apex oracle. The essence of it is that I can choose there to indicate whether the obligation to upload a photo in the form. For example, if the mandatory photo field is set to Yes in the setup tally (this section I assigned P_mandatory_photo), the photo uploaded to the P_Photo change should be necessarily loaded because the "Create" button will be hidden, but if in the setup tile the field "mandatory photo" equals "No", if I haven't even uploaded a

ORA-01745 when executing insert

左心房为你撑大大i 提交于 2019-12-13 02:54:10
问题 The following ExecuteNonQuery returns sql error: ORA-01745: invalid host/bind variable name , but as you can see, these parameter names are not reserved words. Why else would I get this error? (I tried to rename all of my parameters). public bool AddArticle(ArticleModel articleModel) { bool result = false; using (OracleConnection conn = new OracleConnection(BasicConnection.connectionStringOracle)) using (OracleCommand command = conn.CreateCommand()) { conn.Open(); using (var trans = conn

Oracle query for getting particular Date

僤鯓⒐⒋嵵緔 提交于 2019-12-13 02:49:05
问题 I have an oracle query which returns next mont first sunday. now i have a condition here to check if the date which has passed is first sunday of current month, then we need second sunday in current month. Else, next month first sunday. My query: DEF startDate = to_date('somedate', 'dd/mm/yyyy'); Select next_day(last_day(&startDate),'Sunday' ) from dual ; Expected output: if we input 1st july 2018, it has to return 8th july 2018(second sunday) else, any other day apart from first sunday like,

ORA-12514 TNS:listener does not currently know of service requested in connect descriptor for existing service

纵饮孤独 提交于 2019-12-13 02:23:06
问题 I know that this is a pretty popular problem, and I had run into it several times before but were able to resolve it but not this time. I had made sure that I'm using the correct service name by running SQL> select value from v$parameter where name='service_names'; VALUE -------------------------------------------------------------------------------- XE My tnsnames.ora has the XE service name: XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) (CONNECT_DATA =