oracle11g

How can I get Time Zone Region from SQLPLUS?

十年热恋 提交于 2019-12-11 13:53:22
问题 I am using Oracle Developer and Oracle 11g (Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production) select SESSIONTIMEZONE from DUAL; Result in SQLPLUS/system_config_tbl_load.sql: -4:00 Result in SQL Developer: America/New_York gives different results in SQL Developer and SQLPLUS. I want to see the region in SQLPLUS. Additionally I have to do this for multiple locations and do not have the option of changing the Time Zone using "ALTER SESSION SET time_zone = 'America/New_York'

Error: ORA-04043: object table name does not exist when describing any table within a specific user workstation from the SQL command line

痞子三分冷 提交于 2019-12-11 13:49:02
问题 I have created tables in Oracle DB from the SQL command line, and I'm having a problem when describing the table, when going through the oracle application express web page I can see them there. The oracle version I have is the following: SQL*Plus: Release 11.2.0.2.0 Production The following is the command I used to create a table in the database: CREATE TABLE "Product" ( "ProuctID" VARCHAR2(8) NOT NULL ENABLE, "ProductExpiryDate" DATE, "CustomerID" VARCHAR2(8), CONSTRAINT "Product_PK"

multiset union distinct gives “wrong number of types or arguments passed” error

强颜欢笑 提交于 2019-12-11 13:41:46
问题 I am using a for loop to pass different values to a cursor, bulk collect the data and append it to the same nested table using MULTISET UNION operator. However, to avoid duplicate data, i tried to use MULTISET UNION DISTINCT and it throws the error PLS-00306: wrong number or types of arguments in call to 'MULTISET_UNION_DISTINCT' The codes works well without DISTINCT. Please let me know if i'm missing anything here. I'm using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit

Convert NVARCHAR2 to MD5 Hash in Oracle DBMS_OBFUSCATION_TOOLKIT.MD5

烈酒焚心 提交于 2019-12-11 13:40:17
问题 DECLARE l_string NVARCHAR2(600) := '123456'; checksum NVARCHAR2(600); BEGIN DBMS_OUTPUT.DISABLE; DBMS_OUTPUT.ENABLE(1000000); DBMS_OBFUSCATION_TOOLKIT.md5 (input_string => l_string, checksum_string => checksum); DBMS_OUTPUT.PUT_LINE(RAWTONHEX(utl_raw.cast_to_raw(checksum))); END; Expected value: e10adc3949ba59abbe56e057f20f883e But it returns: FFFD00390049FFFD0059FFFDFFFD0056FFFD000FFFFD003E Note I want to maintain nvarchar2 datatype. The value from checksum variable gets stored in column

Data type for storing latitude and longitude in oracle database

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 13:38:09
问题 I want to store latitude and longitude in oracle db. Which data type its good to use it for both these fields. I really appreciate for your reply. "latitude": 48.858844300000001, "longitude": 2.2943506, 回答1: Each column would be NUMBER(x+3,x) where x is the maximum number of decimal places you would ever wish to store (48.858844300000001 is VERY precise). 回答2: CREATE TABLE cola_markets ( mkt_id NUMBER PRIMARY KEY, name VARCHAR2(32), shape SDO_GEOMETRY); And for point CREATE TYPE sdo_point

Query with comma seperated IN parameters in PLSQL

巧了我就是萌 提交于 2019-12-11 13:34:38
问题 I wrote the following in Oracle 11g to separate IN params (I_PRODUCT)and make a query. When I give one parameter as the i_PRODUCT, it is populating some results. When I am inserting multiple comma separated parameters, I am expecting to query one by one and populate the entire result and it is not working. create or replace PROCEDURE RQUERY ( I_PRODUCT VARCHAR2 , O_Cursor OUT SYS_REFCURSOR ) AS BEGIN O_Cursor := NULL; OPEN O_Cursor for SELECT * FROM Table1 WHERE Table1.PRODUCT LIKE ( select

extract value present between XML tags from a blob in Oracle SQL

南楼画角 提交于 2019-12-11 13:31:19
问题 these data is present in a blob COLUMN ("MSG") in my ADMINTXNUNAUTHDATA table <PayBillerRequestDTO><idCustomer>00000024</idCustomer><idBiller>VODA</idBiller><billerName>ojas yadnik </billerName><billReferenceNumber>111</billReferenceNumber></PayBillerRequestDTO> I want to show "111" present between <billReferenceNumber>111</billReferenceNumber> and some other values coming from different tables in a single query select mbl.idbiller as BILLNUMBER, mbl.billernickname AS BILLERNICKNAME, mts

Deletion of files from a directory in oracle stored procedure

删除回忆录丶 提交于 2019-12-11 13:27:10
问题 I am trying to identify all files in a particular directory and delete them. I know that there is a Java procedure for this but I am looking for something in pure PL/SQL. If I am not able to get the list of files and delete them, then I would not mind deleting/dropping the directory and creating it again. If someone can guide me on this it will be of great help. 回答1: I have used the following not too long ago and it worked very well for me http://plsqlexecoscomm.sourceforge.net/ It is as easy

Oracle 11g - Find Records in a CLOB with Carriage Return Line Feed

主宰稳场 提交于 2019-12-11 13:20:01
问题 I am on Oracle 11g. I am trying to do a Find and Replace functionality on a CLOB field (using REPLACE). Now the data in my CLOB has CRLFs in them, the replace works just fine until I want to find a string that contains CRLFs. Perhaps this would be best explained by example: So say the text in my field is: ---------------------------------- Hi there this is some text that has CRLFS in it. Some other text that is there also. Have a nice day Now what I want to do is replace all occurrences of

How to check connection of cassandra with pentaho data integrator

拈花ヽ惹草 提交于 2019-12-11 12:50:38
问题 I'm trying to load data from Oracle table to Cassandra table by using Pentaho Data Integration 5.1(Community Edition). But I'm not getting whether connection has been established between oracle and cassandra. I'm using Cassandra 2.2.3 and Oracle 11gR2. I've added following jars in lib folder of data-integration --cassandra-thrift-1.0.0 --apache-cassandra-cql-1.0.0 --libthrift-0.6.jar --guava-r08.jar --cassandra_driver.jar Please anyone can help me to figure out how to check whether connection