Oracle

SSIS and sending query with date to Oracle

跟風遠走 提交于 2021-01-28 06:26:59
问题 I am trying to create a flow to pull data from an Oracle table into a SQL Server table. I am sending the following query to Oracle to get the data: select distinct CHLD.id, nvl(chld_c_spl, 'N'), to_char(chld_d_start, 'YYYY-MM-DD') chld_d_start, to_char(chld_d_end, 'YYYY-MM-DD') chld_d_end from child chld, picture ptct where CHLD.id = PTCT.chld_id and nvl(chld_d_end, sysdate) >= to_date('01-JAN-2014') and chld_c_veri in ('HC','DR') and nvl(ptct_term, ptct_end) >= to_date('01-JAN-2014') When I

ORA-01797: this operator must be followed by ANY or ALL error

。_饼干妹妹 提交于 2021-01-28 06:09:02
问题 While I am executing the query, select * from file_log f where F.DCP_SRCE_FILENM_FK in ('ABC','DEF') and F.TRANS_DT>=to_date('08/25/2017','mm/dd/yyyy') and F.TRANS_DT<=('08/30/2017','mm/dd/yyyy') am getting the following error: ORA-01797: this operator must be followed by ANY or ALL. Could you all please help me in writing the proper query so that this error would go? 回答1: Just use the date keyword and ISO constants: select * from file_log f where F.DCP_SRCE_FILENM_FK in ('ABC','DEF') and F

Oracle not able to insert data into varchar2(4000 char) column

♀尐吖头ヾ 提交于 2021-01-28 06:00:54
问题 I use Oracle 12c. I have below table in my DB. CREATE TABLE TEST_T (COL VARCHAR2(4000 CHAR)); I need insert multibyte characters in this table. The character is 3 byte character. I am able to insert only 1333 (upto 3999 bytes) characters in table. My expectation is to insert upto 1500 multibyte characters but I get ORA - 01461 . I don't want to change data type to CLOB or LONG. Is there any way to use VARCHAR2(4000 CHAR) to achieve this. Below is the code, SET SERVEROUTPUT ON DECLARE LV_VAR

SQL Showing Rolling 4 Months, Looking for Fiscal Year

别来无恙 提交于 2021-01-28 05:36:23
问题 I have been provided the below SQL query and am looking to modify it. Currently this is only pulling the last 4 months worth of data. I am trying to modify it to run from December 1 through the current month. If anyone is able to guide me through this, that would be greatly appreciated. Select NVL(x.COUNT, 0) + z.COUNT As "Number of RMAs", Case z.MONTH When 1 Then 'Jan.' When 2 Then 'Feb.' When 3 Then 'Mar.' When 4 Then 'Apr.' When 5 Then 'May' When 6 Then 'Jun.' When 7 Then 'Jul.' When 8

程序员入职新公司,只需8步,直接凸显出个人价值

∥☆過路亽.° 提交于 2021-01-28 05:30:47
如果你初入职场,你是否对职场充满好奇与期待;如果你刚刚跳槽,你是否迫切地希望展示自己的才华!当你进入新公司之后,如何能够快速上手工作、融入团队,展现能力,凸显价值? 如果你对新职场存有困惑,以下八个方面一定会让你有所收获,使你的职业规划更加清晰,提高竞争力,更重要的是掌握职业发展的方法论。 1、如何调整心态以适应新环境; 2、初入公司如何给自己设定目标; 3、作为程序员,如何快速上手项目; 4、作为新人,如何快速了解公司的业务; 5、如何尽快了解企业文化并融入团队; 6、如何在试用期内,快速证明自己的能力; 7、如何快速体现自己的价值; 8、如何在新公司做好自己的职业规划; 一、如何调整心态以适应新环境 人们常说,心态决定一切,无论做什么事情,心态都是很重要的一个因素。虽然我们不能改变周围的环境、不能改变别人,但是我们可以调整自己的心态,改变自己。有个好的心态,遇到事情就会从容不迫,心态好,一切都会好。 我将分别从职场新人和跳槽人士两个部分来谈一谈如何调整心态以适应新的工作环境。 1、初入职场六个注意 作为一个职场新人,最重要的变化是从学校的学习生活转变进入职场的工作生活,一切都是新鲜的,步入职场就是进入了社会。其实学校也是一个社会,只不过学校里面没有那么多事情,周围的同学也比较单纯,没有那么复杂。进入职场,其实是进入社会的开始,职场里的人是竞争的关系,能者上,面对各种利益关系

Encrypt decrypt PL SQL Packages in oracle

吃可爱长大的小学妹 提交于 2021-01-28 05:24:27
问题 Is there any way to encrypt the SQL Packages (Stored procedure, Functions etc) in oracle using specific key and decrypt using the same key for security purpose??? i am using oracle 12c.... Thanks, 回答1: Yes, you can use the wrap tool for this, see PL/SQL Source Text Wrapping You can wrap the PL/SQL source text, thereby preventing anyone from displaying that text with the static data dictionary views *_SOURCE . In principle decryption is not supported, however you can use tools like Unwrap It!.

Delete duplicate rows in Oracle SQL, leaving the latest entries

老子叫甜甜 提交于 2021-01-28 05:18:54
问题 I'm using the following SQL to identify duplicates in the table 'transaction_list'. This works perfectly. Now I want to delete all duplicates from that table based on these criteria and leave only the latest entries. These can be identified by the column 'last_update'. I tried different DELETE statements but it didn't work. Any suggestions are highly appreciated. SELECT par_num ,tran_num ,COUNT(*) AS num_duplicates FROM transaction_list WHERE last_update >= to_date('01-mar-2020 00:00:00', 'dd

How to split queried data by delimiter in Oracle?

假装没事ソ 提交于 2021-01-28 05:13:24
问题 I have following row A1,A2,A3;A4,A5,A6 And I want to query this data as 2 rows: A1,A2,A3 and A4,A5,A6 Below query returns multiple rows of A1,A2,A3: select regexp_substr(value, '[^;]+', 1, level) from some_table where some_id = 8 connect by regexp_substr(value, '[^;]+', 1, level) is not null ; 回答1: You can do it using a recursive sub-query factoring clause and simple string functions (rather than slow regular expressions). (Note: this also does not have the issues hierarchical queries do when

Unrecognized option: -MaxMetaspaceSize=256m

允我心安 提交于 2021-01-28 05:05:49
问题 While ordinary run under IDEA I've got: /usr/lib/jvm/java-8-oracle/jre/bin/java ... Unrecognized option: -MaxMetaspaceSize=256m Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Process finished with exit code 1 Why can't I add the -MaxMetaspaceSize=256m JVM property? Additional info: echo $JAVA_HOME /usr/lib/jvm/java-8-oracle/lib sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin

Unrecognized option: -MaxMetaspaceSize=256m

与世无争的帅哥 提交于 2021-01-28 05:00:23
问题 While ordinary run under IDEA I've got: /usr/lib/jvm/java-8-oracle/jre/bin/java ... Unrecognized option: -MaxMetaspaceSize=256m Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Process finished with exit code 1 Why can't I add the -MaxMetaspaceSize=256m JVM property? Additional info: echo $JAVA_HOME /usr/lib/jvm/java-8-oracle/lib sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin