Oracle

How to MAP nested table,associative array or varray to JAVA SOURCE in Oracle DB

自作多情 提交于 2021-02-11 15:45:53
问题 I need to pass a collection to a JAVA SOURCE in the oracle database. This is the illustration of the current setup without collection where oracle varchar2 is mapped to java String and it is working fine The code below:- The java source:- import java.io.*; public class Test_java extends Object{ public static String print_test(String test) throws Exception { try{ System.out.println(test); return "UP"; } catch(Exception e) { return "DOWN" + e.getMessage(); } } }; The invoking function:- CREATE

How to set single row view as default in Oracle APEX

时光怂恿深爱的人放手 提交于 2021-02-11 15:45:20
问题 I have a master interactive grid feeding a detail interactive grid on the side that always has exactly one row. I want this detail interactive grid to be displayed in single row format. I have looked at all the attributes and googled it for hours but I am stumped. Any ideas? Single row view looks like this: http://prntscr.com/moi8ra 回答1: to make an interactive grid show up in single row view by default (like the selection "Single row view" in the row actions menu), put the following code into

How to get the values seperated by comma in a single column using SQL

亡梦爱人 提交于 2021-02-11 15:41:42
问题 I have the below table and expected result. Please let me know if it is possible to achieve the result. Please refer the picture attached. 回答1: You can use listagg() : select e.id, e.name, e.sal, listagg(d.dept, ',') within group (order by d.dept_id) as depts, listagg(d.dept_id, ',') within group (order by d.dept_id) as dept_ids, from employee e left join department d on e.name = d.name group by e.id, e.name, e.sal; Some comments on the data model. Your department table should have a dept_id

micronaut-data : multiple data sources

谁说我不能喝 提交于 2021-02-11 15:31:44
问题 I have multiple databases in yml, how to get country specific repository? i am getting country name at runtime and based on country name i need to do operation with that country database, with single database it taking default database repository from yml. as per micronaut document : In multiple datasource scenario, the @io.micronaut.data.annotation.Repository annotation can be used to specify the datsource configuration to use. By default Micronaut Data will look for the default datasource.

group multiple oracle tables in one table based on order

若如初见. 提交于 2021-02-11 15:31:33
问题 I'm new to oracle. I have three tables: START_NODES: ref_id id orn -------------------- 1 100 0 1 200 1 1 300 2 1 400 3 2 160 0 2 260 1 2 360 2 2 460 3 Middle_NODES: ref_id id orn -------------------- 1 1000 0 1 2000 1 2 1500 0 2 2500 1 2 3500 2 2 4500 3 2 5500 4 END_NODES: ref_id id orn -------------------- 1 150 0 1 250 1 1 350 2 1 450 3 2 170 0 2 270 1 2 370 2 2 470 3 I need to group them in one table based on ref_id and orn where orn is the order of start_nodes then middle nodes then end

micronaut-data : multiple data sources

落花浮王杯 提交于 2021-02-11 15:30:15
问题 I have multiple databases in yml, how to get country specific repository? i am getting country name at runtime and based on country name i need to do operation with that country database, with single database it taking default database repository from yml. as per micronaut document : In multiple datasource scenario, the @io.micronaut.data.annotation.Repository annotation can be used to specify the datsource configuration to use. By default Micronaut Data will look for the default datasource.

How do I change the default NLS parameters for date format through Toad?

江枫思渺然 提交于 2021-02-11 15:27:36
问题 I have a NLS date format as DD-MON-RR. This gives me the underlying date format as YY while I want to change it to YYYY. I tried using the following query and it ran successfully DECLARE v_date DATE := sysdate; BEGIN DBMS_OUTPUT.put_line(TO_CHAR(v_date, 'MM/DD/YYYY')); END; But that didn't change the default format. for some context, I am trying to import data from Oracle to Tableau. Unfortunately when I try to export a crosstab from Tableau server it looks at the underlying data rather than

Oracle Client and ODP.NET version compatibility

两盒软妹~` 提交于 2021-02-11 15:23:52
问题 We have upgraded Oracle to 19C and also upgraded the Oracle.ManagedDataAccess package to 19.6. However, when we try to open our application on Oracle database 12 then it is showing error, as some machines still has Oracle 12 (Old) database. can someone please share the Oracle Data Provider (ODP.Net) compatibility details with Oracle Clients? 回答1: The error message does not indicate any incompatibility. Looks like the Oracle.ManagedDataAccess driver does not find your tnsnames.ora file Have a

JAVA代码之斗地主发牌

丶灬走出姿态 提交于 2021-02-11 15:20:53
理解很好理解,关键是思路 按照斗地主的规则,完成洗牌发牌的动作:  具体规则: 1. 组装54张扑克牌  2. 将54张牌顺序打乱 3. 三个玩家参与游戏,三人交替摸牌,每人17张牌,最后三张留作底牌。 4. 查看三人各自手中的牌(按照牌的大小排序)、底牌 手中扑克牌从大到小的摆放顺序:大王,小王,2,A,K,Q,J,10,9,8,7,6,5,4,3 package com.oracle.demo01; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class Doudizhu { public static void main(String[] args) { //1.创建扑克牌Map Map < Integer ,String > pooker=new HashMap < Integer ,String > (); //创建所有key所在的容器 ArrayList < Integer > pookerNum=new ArrayList < Integer > (); //创建花色数组 String[] color={"♠","♣","♥","♦"}; //创建牌号数组 String[] number=

Which statement is needed to revise?

心已入冬 提交于 2021-02-11 15:13:48
问题 I tried to create several tables, but only the server table was created. Please fix my work! CREATE TABLE server ( SERVER_ID varchar(25) NOT NULL, SERVER_IP varchar(15) NOT NULL, SERVER_LOCATION varchar(25) NOT NULL, SERVER_BRAND varchar(15) NOT NULL, CONSTRAINT server_pk PRIMARY KEY (SERVER_ID) ); CREATE TABLE application ( APP_ID varchar(25) NOT NULL, ACCOUNT_NUM varchar(25) NOT NULL, RECORD_ID varchar(10) NOT NULL, VERSION_ID varchar(10) NOT NULL, LAST_UPDATED date NOT NULL, CONSTRAINT