oracle10g

Input string was not in a correct format and ORA-01465: invalid hex number

允我心安 提交于 2019-12-11 17:26:46
问题 Development Platform/Tools I use: (OS: XP with SP3 IDE: VS2010 with SP1 / ASP.NET 4.0 ADD-IN: Oracle ODT with ODAC 11.2 Database: Oracle 10.2g This is a continuation of my yesterday's concern (please see How To Insert USERID (Type: Raw, Size: 16) from Ora_aspnet_users to Another Table ). I am now able to insert the Raw datatype if I will use HARDCODED username/userid in DropDownList. However, if I create a Datasource to become DYNAMIC the username/userid, it will thrown error as indicated in

How to avoid 0 values using MIN and MAX function in SQL?

那年仲夏 提交于 2019-12-11 17:16:30
问题 I have table like this: Running Date 128 1/1/2018 700 6/11/2018 900 6/11/2018 300 6/11/2018 If same dates then pick minimum value and maximum value and get difference from "RUNNING" Column. If only one date then do nothing and get same value Query: SELECT MAX(RUNNING) - MIN(RUNNING) "RUNNING", DATE FROM TABLE GROUP BY DATE; I got following results: Running Date 0 1/1/2018 600 6/11/2018 But i want "128" value with "1/1/2018" date but this give 0 value How to solve this? 回答1: Include a CASE

System.Data.OracleClient.dll crashes w3wp.exe on w2k8

时间秒杀一切 提交于 2019-12-11 16:55:28
问题 I'm using Windbg to debug an error that is happening in a website that we have on a Windows Server 2008, IIS7 environment. I've set the symbol path to "SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols" Then I browse the website, which takes me to the login page. In that moment I attach Windbg to the w3wp.exe process. I then enter my credentials into the login page and submit the form, which is the process that is giving problems. I then select Windbg -> Debug -> Go Unhandled

ODP.net + VB = Table not found

心已入冬 提交于 2019-12-11 16:53:54
问题 I am new to Oracle and I have just installed Oracle 10g XE,and its ODAC package for .NET. I am making a simple connect-and-get-table app in VB,however,it always throws a "Table not found" error. I created the "Test" table in Oracle Home (the web admin thing) and here is the code I'm using in VB : Dim oraCmd As New OracleCommand("Select * From Test") oraCmd.Connection = oraCon oraCon.Open() oraCmd.ExecuteReader() 'Reader code supressed EDIT When I try the same query in Database Home, it works.

Copying of data from varchar2 to number in a same table

吃可爱长大的小学妹 提交于 2019-12-11 16:47:42
问题 I have two columns and i need to copy of data from column VISITSAUTHORIZED to NEWVISITS, When i use below command to copy data i am getting an error message "invalid number".Can anyone correct this ? VISITSAUTHORIZED VARCHAR2(10) NEWVISITS NUMBER(8) SQL> update patientinsurance set NEWVISITS=VISITSAUTHORIZED ; ERROR at line 1: ORA-01722: invalid number 回答1: It depends what kind of data you have in your old column. If it is all consistently formatted then you might be able to do: update

Oracle 10g: Inserting multiple rows

空扰寡人 提交于 2019-12-11 15:26:22
问题 I'm having the following select statement : select dte, wm_concat(issue) as issues from ((select date_a as dte, issue from t where date_a is not null) union all (select date_b, issue from t where date_b is not null) ) di group by dte order by dte; that returns multiple rows such as: DTE | ISSUES -----------+--------- 01/JUN/91 | EE 01/JUN/03 | EE 01/JAN/06 | HH 01/AUG/06 | EE 01/AUG/08 | EE,HS,HE I would like insert these records into a table. Question How should I write the insert statement

How to rename a column in a query in ORACLE

我怕爱的太早我们不能终老 提交于 2019-12-11 14:43:14
问题 Is this query right for changing the name of a column in the employees table: select first_name, rename_column('first_name' to 'empName') from employees; 回答1: there are two ways 1) give alias name to the column SELECT first_name AS emp_name FROM employee; 2) change column name alter table employee rename first_name to emp_name ; 回答2: To set an alias for a field use the following: SELECT first_name AS "empName", hire_date AS "Tenure On December 31 2014" FROM employees; 回答3: If you are going to

Error using CURRENT_TIMESTAMP() into a query

主宰稳场 提交于 2019-12-11 14:35:44
问题 I want to compare two date in jpql query using the current date function I got an error Syntax error parsing [SELECT d FROM Dossier d WHERE d.depid=1 AND d.typeDossier = :tpd AND d.dateCreation < CURRENT_TIMESTAMP() + 5]. [105, 107] The left expression is not an arithmetic expression This is my query: public List<Dossier> getDossierFindAllParDepartementDBTECHandUrgen() { return (List<Dossier>) em.createQuery("SELECT d FROM Dossier d WHERE d.depid=1 AND d.typeDossier = :tpd AND " + "d

oracle dynamic queries

妖精的绣舞 提交于 2019-12-11 14:28:53
问题 I am new with these oracle dynamic queries, I am just trying to build a dynamic query, so I could get records according to it. Here is my PL/ SQL statement: declare sql_query varchar2(5000) := 'select FKOM_OFFICE_ID,FKBAM_BUDGET_ID '; begin for x in (select distinct PFS_SOURCE_ID,PFS_SOURCE_ENG from PBS_FC_SOURCE WHERE PFS_UPPER_SOURCE_ID!=0 ORDER BY PFS_SOURCE_ID ASC ) loop sql_query := sql_query || ' , nvl(sum(case when FKBAB_SOURCE_ID = '||x.PFS_SOURCE_ID||' then FKOD_AMOUNT ELSE 0 end),0)

how to change the block status to insert in 10g using a button trigger

假装没事ソ 提交于 2019-12-11 14:25:52
问题 how to change the block or form status to 'insert' in oracle forms 10g using when-button-pressed trigger. I want to do the same thing like the 'insert record' button in the default tool bar but using a custom button any ideas? 回答1: Call do_key('create_record'); in your when-button-pressed trigger. This will insert a new record in the current block with all, what state changes accordingly. Changing the state with set_record_property(:system.cursor_record, :system.cursor_block, state, 'INSERT')