oracle11g

Oracle cannot store emoji

末鹿安然 提交于 2019-12-11 15:13:49
问题 I have a problem saving emoji to the Oracle database. This is a simple Java program which takes user input from the webpage and save it to the database. This is what it looks like before I save to DB. And this is what it looks like when it retrieves it from database. The database column defined as CLOB so my expectation that it persist text with emoji just fine. I also tried to save and retrieve emoji with sqlplus and have no luck as well: SQL> update emoji_table set emoji_column = 'Test 😂'

Issue with Oracle regex

放肆的年华 提交于 2019-12-11 15:07:03
问题 select regexp_substr('select count(distinct empno), count(distinct deptno) from emp', 'count\(distinct.*\)') from dual; For the above query I want output count(distinct empno) , but the ".*" in the above query is taking the last occurrence of ")" and not the first occurrence. Can anyone please tell how to get the output I want? 回答1: The * operator is 'greedy' by default. You're allowing any characters between distinct and ) , in any quantity. and including the first ) itself. As EatÅPeach

How to fix the mutating trigger in oracle

情到浓时终转凉″ 提交于 2019-12-11 15:01:39
问题 I wrote the trigger for updating the column value in the same table. For Ex I wrote a trigger on metermaster table after update of assettype column , with in the trigger i am trying to update the instantaneousinterval column in the same metermaster table. Its throws the error like this ERROR: ORA-04091: table PSEB.METERMASTER is mutating, trigger/function may not see it. my trigger code is as follows: CREATE OR REPLACE TRIGGER PSEB.spiupdate AFTER update of assettype ON pseb.metermaster

Executing stored procedure in vb.net

匆匆过客 提交于 2019-12-11 14:48:02
问题 I need to execute a stored function in oracle or sql through vb.net. I created a command object. Depending on the database type(oracle or SQL) i am preparing the Command text as Select functionName(?,?,?,?,?,?,?,?) from dual; (For Oracle) Adding the parameter values of the function Now performing the ExecuteScalar which is not working saying invalid parameter. This works with ODBC connection string. But ODBC doesn't with 64bit. My Requirement: Code should execute a user defined stored

ORA-00904: “CEILING”: invalid identifier in ORACLE 11G

本小妞迷上赌 提交于 2019-12-11 14:47:54
问题 ceiling in oracle 11g throws java.sql.SQLException: ORA-00904: "CEILING": invalid identifier. Till now are used Oracle 10G, now we upgraded to 11G,afterthe we are getting ""CEILING": invalid identifier" error can any one help on this please. 回答1: There is no function CEILING that is part of any stock Oracle database install of any version. If you are using a function CEILING in your 10g database, that implies that it is a user-defined function. If that function doesn't exist in 11g, you'd

Getting error as “ORA-32044: cycle detected while executing recursive WITH query”

断了今生、忘了曾经 提交于 2019-12-11 14:36:39
问题 I am getting error as "ORA-32044: cycle detected while executing recursive WITH query" while executing the following query in Oracle. WITH EmpsCTE (affiliation_id, from_customer_id,to_customer_id, to_name, level1) AS ( SELECT affiliation_id, from_customer_id,to_customer_id, to_name, 0 FROM affiliation aff WHERE to_customer_id != from_customer_id and to_customer_id = 1000022560394 UNION ALL SELECT aff.affiliation_id, aff.from_customer_id,aff.to_customer_id, aff.to_name, m.level1 + 1 FROM

SQL cursor issue

爷,独闯天下 提交于 2019-12-11 14:34:56
问题 I am trying to create a new table using a cursor and a select statements. Declare Cursor c1 is select store_number from table1 where CLIENT_ID= 1 and ORG_ID = 1 ; Type C1_TAB_TYPE is table of c1%ROWTYPE; c1_list c1_TAB_TYPE; Begin For r1 in c1 Loop select store_number BULK COLLECT INTO c1_list from ( SELECT store_number, ( (SDO_GEOM.SDO_AREA(SDO_GEOM.SDO_INTERSECTION(a.geometry,b.geometry, 0.005), 0.005, 'unit=sq_mile') /SDO_GEOM.SDO_AREA((a.geometry), 0.005, 'unit=sq_mile'))*100) Total_area

SQL: Inserting row for missing month(s)

萝らか妹 提交于 2019-12-11 14:23:27
问题 I have a table as follow: |----------|----------| | DT | FLAG | |----------|----------| | 2015-MAY | E | | 2015-JUN | H | | 2015-OCT | E | | 2016-FEB | E | |----------|----------| That I would like to transform as follow: |----------|----------| | DT | FLAG | |----------|----------| | 2015-MAY | E | | 2015-JUN | H | | 2015-JUL | V | | 2015-AUG | V | | 2015-SEP | V | | 2015-OCT | E | | 2015-NOV | V | | 2015-DEC | V | | 2016-JAN | V | | 2016-FEB | E | |----------|----------| Missing months are

Is it possible to store an image in oracle 11g express edition?

拟墨画扇 提交于 2019-12-11 14:10:04
问题 Is there any other datatype that allows an image to be stored into the database? The list of data types that appears in Oracle 11g express edition is shown in the picture below. Please help!! 回答1: Use BLOB. Not legacy LONG RAW. 来源: https://stackoverflow.com/questions/15601375/is-it-possible-to-store-an-image-in-oracle-11g-express-edition

Oracle and programming

帅比萌擦擦* 提交于 2019-12-11 13:59:46
问题 I just wanted to know how I can store a picture in oracle data base ; 回答1: Well, as with anything in oracle, there are a handful of ways to store a photo. You can store it as a BLOB and should be pretty easy to implement loading photos into that type of field. A blob (in 10g) can store up to 8 terabytes in size. You could also use the READ_IMAGE_FILE and WRITE_IMAGE_FILE functions built into oracle forms and use a RAW datatype as opposed to a BLOB datatype. References: Asktom on READ_IMAGE