When I try to connect to Oracle using sys, I got the following error:
How-To
Using sys as sysdba as username is working fine.
FUNCTION FN_GET_BIZ_COD (i_biz_cod IN VARCHAR2)
RETURN VARCHAR2 IS o_result VARCHAR2(2) := '';
BEGIN
CASE i_biz_cod
WHEN '01' THEN o_result := ' P';
WHEN '02' THEN o_result := ' S';
WHEN '03' THEN o_result := ' 8';
WHEN '04' THEN o_result := ' 3';
WHEN '05' THEN o_result := ' 8';
WHEN '06' THEN o_result := '11';
WHEN '07' THEN o_result := ' 6';
END CASE;
RETURN o_result;
END FN_GET_BIZ_COD;
FUNCTION FN_GET_BIZ_COD (i_biz_cod IN VARCHAR2)
RETURN VARCHAR2 IS o_result VARCHAR2(2) := '';
BEGIN
CASE i_biz_cod
WHEN '01' THEN o_result := ' P';
WHEN '02' THEN o_result := ' S';
WHEN '03' THEN o_result := ' 8';
WHEN '04' THEN o_result := ' 3';
WHEN '05' THEN o_result := ' 8';
WHEN '06' THEN o_result := '11';
WHEN '07' THEN o_result := ' 6';
ELSE o_result := '';
END CASE;
RETURN o_result;
END FN_GET_BIZ_COD;
=concatenate(char(34), A1, char(34))
tr.odd td.detail { background-color: #eaeaea; }
java -jar "C:\schemaspy\schemaSpy_5.0.0.jar" ^ -dp "C:\schemaspy\ojdbc6.jar" ^ -t orathin ^ -db TEST_DB ^ -s ap_tax ^ -host localhost ^ -port 1521 ^ -u system ^ -p password ^ -schemas "ODS,TS" ^ -charset UTF-8 ^ -o "C:\schemaspy\schema_doc" ^ -norows -hq -css "C:\schemaspy\schemaSpy.css" ^
java -jar "C:\schemaspy\schemaSpy_5.0.0.jar" -dp "C:\schemaspy\ojdbc6.jar" -t orathin -db TEST -s ap_tax -host localhost -port 1521 -u system -p password -schemas "ODS,TS" -charset UTF-8 -o "C:\schemaspy\schema_doc" -norows -hq -css "C:\schemaspy\schemaSpy.css"
java -jar "C:\schemaspy\schemaSpy_5.0.0.jar" ^ -dp "C:\schemaspy\ojdbc6.jar" ^ -t orathin ^ -db TEST ^ -s ap_tax ^ -host localhost ^ -port 1521 ^ -u system ^ -p password ^ -schemas "ODS,TS" ^ -charset UTF-8 ^ -o "C:\schemaspy\schema_doc" ^ -norows -hq -css "C:\schemaspy\schemaSpy.css" ^
case 幣別when 'NTD' then '01'when 'USD' then '51'when 'HKD' then '52'when 'JPY' then '53'
FUNCTION FN_GET_CCY_CODE (i_ccy IN VARCHAR2) RETURN VARCHAR2 IS o_ccy_code VARCHAR2(2) := ''; BEGIN CASE i_ccy WHEN 'NTD' THEN o_ccy_code := '01'; WHEN 'USD' THEN o_ccy_code := '51'; WHEN 'HKD' THEN o_ccy_code := '52'; WHEN 'JPY' THEN o_ccy_code := '53'; END CASE; RETURN o_ccy_code; END FN_GET_CCY_CODE;
<#-- 取得現在時間 --> <#assign aDateTime = .now> <#-- 只保留日期 --> <#assign aDate = aDateTime?date> <#-- 取出日期中的年份、轉數字,減去 1911 得到民國年 --> 列印年:${aDate?string.YYYY?number - 1911} <#-- 取出日期中的月份 --> 列印月:${aDate?string.MM} <#-- 取出日期中的日期 --> 列印日:${aDate?string.dd}
create sequence seq_test start with 1 increment by 1;
select (select lpad(to_char(seq_test.NEXTVAL), 4, '0') from dual) as seq, ......... from ............ where .........
FUNCTION FN_GET_NEXT_SEQ_VAL RETURN VARCHAR2 IS v_next_seq_val VARCHAR2(4) := ''; BEGIN select lpad(to_char(seq_test.NEXTVAL), 4, '0') into v_next_seq_val from dual; return v_next_seq_val; END FN_GET_NEXT_SEQ_VAL;
select FN_GET_NEXT_SEQ_VAL() as seq, ......... from ............ where .........
CURRVAL
and NEXTVAL
can be used in the following places:VALUES
clause of INSERT
statementsSELECT
list of a SELECT
statementSET
clause of an UPDATE
statementCURRVAL
and NEXTVAL
cannot be used in these places:SELECT
statement with the DISTINCT
operatorSELECT
statement with a GROUP
BY
or ORDER
BY
clauseSELECT
statement that is combined with another SELECT
statement with the UNION,
INTERSECT
, or MINUS
set operatorWHERE
clause of a SELECT
statementDEFAULT
value of a column in a CREATE
TABLE
or ALTER
TABLE
statementCHECK
constraint<#assign total = 0> ${"水果名稱"?right_pad(10)}${"單價"?right_pad(5)}${"訂購數量"?right_pad(10)} ${"-"?right_pad(25, "-")} <#list rows as row> <#assign total += row.price * row.quantity> ${row.name?right_pad(10)}${row.price?left_pad(5)}${row.quantity?left_pad(10)} </#list> ${"-"?right_pad(25, "-")} 總筆數:${rows?size?left_pad(10)} 總金額:${total?left_pad(10)}
水果名稱 單價 訂購數量 ------------------------- apple 50 20 avocado 60 2 banana 70 1 cherry 80 10 coconut 90 1 durian 100 3 ------------------------- 總筆數: 6 總金額: 2,380
<#assign total = 0> ${"水果名稱"?right_pad(10)}${"單價"?right_pad(5)}${"訂購數量"?right_pad(10)} ${"-"?right_pad(25, "-")} <#list rows as row> <#assign total += row.price * row.quantity> ${row.name?right_pad(10)}${row.price?left_pad(5)}${row.quantity?left_pad(10)} </#list> ${"-"?right_pad(25, "-")} 總筆數:${rows?size?left_pad(10)} 總金額:${total?left_pad(10)}
水果名稱 單價 訂購數量 ------------------------- apple 50 20 avocado 60 2 banana 70 1 cherry 80 10 coconut 90 1 durian 100 3 ------------------------- 總筆數: 6 總金額: 2,380
Catalog (-cat) was not provided and unable to deduce catalog, wildcard catalog can be used -cat %
-cat "%"
in your command line.insert into test (...) values (...);
INSERT INTO test (...) VALUES (...);
CREATE OR REPLACE PACKAGE PG_TEST_001 AS v_last2Month VARCHAR2 := ''; PROCEDURE SP_Get_LAST2MONTH(i_dataId IN VARCHAR2, o_last2Month OUT VARCHAR2); END PG_TEST_001; /
PLS-00215: String length constraints must be in range
CREATE OR REPLACE PACKAGE PG_TEST_001 AS v_last2Month VARCHAR2(8) := ''; PROCEDURE SP_Get_LAST2MONTH(i_dataId IN VARCHAR2, o_last2Month OUT VARCHAR2); END PG_TEST_001; /
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; import java.util.stream.Stream; .... pubilc void readAndPrintContent(String file) throws IOException { try (Stream<String> stream = Files.lines(Paths.get(file), Charset.forName("Cp937"))) { stream.forEach(log::debug); } catch (IOException e) { throw new IOException("fail to read file, error : " + e.getMessage(), e); } } |
{ "test_no":"9999", "year":"0108", "registerDate":"20191031" }
SELECT JSON_VALUE(JSON_COLUMN, '$.test_no' RETURNING VARCHAR2) FROM test_table