ora-00923

oracle10g hibernate problem

心不动则不痛 提交于 2020-02-23 07:36:27
问题 when my app startup, i get error like below, can anyone elaborate what i missed out? the app running fine when using mysql. do i miss out any extra parameter in config.xml file? 2009-08-17 11:32:12,294 [main] INFO [info.jtrac.config.DataSourceFactoryBean] - Not using embedded HSQLDB or JNDI datasource, switching on Apache DBCP data sour ce connection pooling 2009-08-17 11:32:14,826 [main] WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: null 2009-08-17 11:32:14,826

oracle10g hibernate problem

耗尽温柔 提交于 2020-02-23 07:35:29
问题 when my app startup, i get error like below, can anyone elaborate what i missed out? the app running fine when using mysql. do i miss out any extra parameter in config.xml file? 2009-08-17 11:32:12,294 [main] INFO [info.jtrac.config.DataSourceFactoryBean] - Not using embedded HSQLDB or JNDI datasource, switching on Apache DBCP data sour ce connection pooling 2009-08-17 11:32:14,826 [main] WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: null 2009-08-17 11:32:14,826

Turn values from table into column headers

吃可爱长大的小学妹 提交于 2020-01-17 05:38:30
问题 I'm trying to take values from rows of a table and turn them into column headers. For example, my table currently looks like this: _id question_id category ----- ------------- ---------- 1 767 back 1 768 dev 2 768 dev and I would like it to look like this: _id 767 768 ----- -------- ----- 1 back dev 2 (null) dev I have found solutions on here using CASE/WHEN , but I am getting errors when trying to implement the solutions. My code is below. In this case, I am getting a ORA-00923: FROM keyword

How do you select all columns, plus the result of a CASE statement in oracle 11g?

徘徊边缘 提交于 2019-12-31 10:05:43
问题 I want to select *, and not have to type out all individual columns, but I also want to include a custom column with a case statement. I tried the following: select *, (case when PRI_VAL = 1 then 'High' when PRI_VAL = 2 then 'Med' when PRI_VAL = 3 then 'Low' end) as PRIORITY from MYTABLE; But it is complaining that ORA-00923: FROM keyword not found where expected 回答1: Add an alias for mytable like this: select t.*, (case when PRI_VAL = 1 then 'High' when PRI_VAL = 2 then 'Med' when PRI_VAL =

How do you select all columns, plus the result of a CASE statement in oracle 11g?

自古美人都是妖i 提交于 2019-12-31 10:05:11
问题 I want to select *, and not have to type out all individual columns, but I also want to include a custom column with a case statement. I tried the following: select *, (case when PRI_VAL = 1 then 'High' when PRI_VAL = 2 then 'Med' when PRI_VAL = 3 then 'Low' end) as PRIORITY from MYTABLE; But it is complaining that ORA-00923: FROM keyword not found where expected 回答1: Add an alias for mytable like this: select t.*, (case when PRI_VAL = 1 then 'High' when PRI_VAL = 2 then 'Med' when PRI_VAL =

Confusion over one-to-one mapping in NHibernate

强颜欢笑 提交于 2019-12-23 18:50:38
问题 Can someone suggest to me the appropriate Mapping to be used in the following situation: Parent Table - AllTransactions Child Table - TranCategory1, TranCategory2 and TranCategory3 and 8 more. All twelve tables share the same composite keys. Now count in AllTransactions is the sum of transactions in all the child tables. The child tables contain only unique values from the parent table. The mapping that I am using is shown below. I am using constrained="true" in the Parent table only to avoid

ORACLE SQL listagg function

无人久伴 提交于 2019-12-17 16:57:19
问题 I'm not sure what's going on here, mostly because I've never used this function, but when I use the listagg function on our Oracle 11g database it gives me an ORA-00923 FROM keyword not found where expected. Here's my SQL SELECT cdm.courses_id,cde.additional_resources, listagg (dm.delivery_method_desc, ',') WITHIN GROUP (ORDER BY dm.delivery_method_desc) delivery_methods FROM tablespace.course_de_delivery_methods cdm, tablespace.course_distance_ed cde, tablespace.delivery_methods dm WHERE cdm

PLSQL CASE WHEN CONDITION

末鹿安然 提交于 2019-12-12 16:32:44
问题 I have two queries. Query 1. Below PL/SQL is not working. I want to store the output into varable test1 and test2. It's saying ORA-00923: FROM keyword not found. Not sure what is wrong DECLARE file_id NUMBER(10) NOT NULL :=5; test1 varchar(100); test2 varchar(100); BEGIN DBMS_OUTPUT.PUT_LINE('File Id: ' || file_id); SELECT table_name INTO test1, (CASE owner WHEN 'SYS' THEN 'The owner is SYS' WHEN 'SYSTEM' THEN 'The owner is SYSTEM' END) INTO test2 FROM all_tables WHERE rownum <= 1; END; Query

MySQL 项目移植Oracle

自闭症网瘾萝莉.ら 提交于 2019-12-01 08:13:41
最近公司公司项目为支持oralce数据库,我们对项目进行移植,项目中使用 MyBatis需要手工对 MyBatis sql xml文件进行修改,修改过程中遇到不少问题,记录在此方便后续查看。 数据类型错误 ORA-00932 SELECT DISTINCT sg.ID, sg.CODE, sg.NAME, sg.ORGANIZATION_ID, sg.DESCRIPTION, -- to_char(sg.DESCRIPTION), sg.SORT, sg.CREATE_USER, FROM SYS_GROUP sg 原因:DESCRIPTION字段类型为NCLOB,而DISTINCT不支持对 NCLOB类型字段进行操作,使用to_char函数进行转换即可 ora-02290 违反检查约束条件 此条错误出现在执行一条新增SQL语句时,检查半天后未发现有什么异常,该语句在MYSQL也能够正常执行,后来查询资料了解到可以查询视图CONSTRAINT_NAME进行检查。 select * from dba_constraints where CONSTRAINT_NAME like '%89071'; 仔细查询之后发现出现此原因情况是表字段缺少,MYSQL环境下该表某个字段设置有默认值,但移植到ORACLE环境下未对该字段设置默认值,同时SQL语句中也未申明该字段于是出现这种错误。

ORACLE SQL listagg function

故事扮演 提交于 2019-11-28 01:54:39
I'm not sure what's going on here, mostly because I've never used this function, but when I use the listagg function on our Oracle 11g database it gives me an ORA-00923 FROM keyword not found where expected. Here's my SQL SELECT cdm.courses_id,cde.additional_resources, listagg (dm.delivery_method_desc, ',') WITHIN GROUP (ORDER BY dm.delivery_method_desc) delivery_methods FROM tablespace.course_de_delivery_methods cdm, tablespace.course_distance_ed cde, tablespace.delivery_methods dm WHERE cdm.courses_id = cde.courses_id AND cdm.delivery_methods_id = dm.delivery_methods_id GROUP BY cdm.courses