Oracle

LiveSQL keeps showing me this: ORA-00933: SQL command not properly ended [duplicate]

北城以北 提交于 2021-02-04 21:46:58
问题 This question already has answers here : Insert multiple records in oracle (3 answers) Closed 3 months ago . INSERT INTO Countries (Country, Capital, Cities) VALUES ('Philippines','Manila',122), ('USA','Washington',19495), ('Brazil','Brasilia',1642), ('Latvia','Riga',9), ('Egypt','Cairo',124) ; I've tried removing the (Country, Capital, Cities) , sticking it back on, putting them all in the same line, putting bigger indents, spacing them out. nothing. It keeps throwing me this error: ORA

Creating a table if it doesn't exist already

牧云@^-^@ 提交于 2021-02-04 21:39:02
问题 I'm trying to create a table if it doesn't exist already. I'm currently checking to see if it exists in DBA_TABLES first and if that query returns nothing then insert. Is there a way to just check in the same statement so I don't have to break it up into separate queries? This is what I have currently. BEGIN SELECT COUNT(*) INTO lvnTableExists FROM DBA_TABLES WHERE Table_Name = 'SOME_TABLE'; IF lvnTableExists = 0 THEN EXECUTE IMMEDIATE 'CREATE TABLE SOME_TABLE AS (SELECT * FR0M OTHER_TABLE)';

Creating a table if it doesn't exist already

╄→尐↘猪︶ㄣ 提交于 2021-02-04 21:35:47
问题 I'm trying to create a table if it doesn't exist already. I'm currently checking to see if it exists in DBA_TABLES first and if that query returns nothing then insert. Is there a way to just check in the same statement so I don't have to break it up into separate queries? This is what I have currently. BEGIN SELECT COUNT(*) INTO lvnTableExists FROM DBA_TABLES WHERE Table_Name = 'SOME_TABLE'; IF lvnTableExists = 0 THEN EXECUTE IMMEDIATE 'CREATE TABLE SOME_TABLE AS (SELECT * FR0M OTHER_TABLE)';

Sql Developer can conect Oracle Database 12c with TNS but can not connected with basic

拥有回忆 提交于 2021-02-04 21:25:54
问题 I have installed a new oracle database(12.2.0.1). I have create a pluggable database (orclpdb). I create a user Fed_Test_User in the PDB. And I can connect it by SQL developer with TNS(can connect by conn Fed_Test_User/welcome@orclpdb). But I can not connect by SQL Developer with basic connection type. Listener.ora: LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) sqlnet.ora: NAMES

How to JOIN a table in MySQL with a table in Oracle

戏子无情 提交于 2021-02-04 19:47:25
问题 Now, I'm pretty sure that it's not possible, but I want to 1) Confirm this, and 2) Hear alternatives. My solution today was to run the MySQL query, then use its result to construct a "NOT IN ('value1', 'value2', 'value3')" string, which I tacked onto the Oracle query before running it. Rather cumbersome, but it worked, and it's fast enough so far. What is the typical way of solving this problem? 回答1: Typical way, assuming the Oracle & MySQL databases are allowed to talk to one another, would

Oracle EBS AR 收款调整取值

不打扰是莪最后的温柔 提交于 2021-02-04 19:34:23
SELECT ct.trx_number ,adj.adjustment_number ,ad.amount_dr ,ad.amount_cr ,ad.source_table ,ad.source_type ,xla_oa_functions_pkg.get_ccid_description(gcc.chart_of_accounts_id ,ad.code_combination_id) FROM ar_distributions_all ad ,ar_adjustments_all adj ,ra_customer_trx_all ct ,gl_code_combinations gcc WHERE ad.source_table = ' ADJ ' AND ad.source_id = adj.adjustment_id AND adj.customer_trx_id = ct.customer_trx_id AND gcc.code_combination_id = ad.code_combination_id; 来源: oschina 链接: https://my.oschina.net/u/4374628/blog/3740330

Oracle EBS AR 收款取值

江枫思渺然 提交于 2021-02-04 19:34:09
select hr.name, a.autoapply_flag, a.AUTOMATCH_SET_ID, a.LEGAL_ENTITY_ID, a.RECEIPT_NUMBER, a.type, a.receipt_date, b.gl_date, c.name, a.remit_bank_account, ce.bank_account_name, a.attribute3 from AR_CASH_RECEIPTS_V a, hr_operating_units hr, AR_CASH_RECEIPT_HISTORY_ALL b, AR_RECEIPT_METHODS c, ce_bank_accounts ce where a.org_id = hr.organization_id AND b.CASH_RECEIPT_ID( + ) = a.CASH_RECEIPT_ID AND b.ORG_ID( + ) = a.ORG_ID AND b.FIRST_POSTED_RECORD_FLAG( + ) = ' Y ' and hr.organization_id = 89 AND a.RECEIPT_METHOD_ID = c.RECEIPT_METHOD_ID and a.remit_bank_account = ce.bank_account_num and a

Oracle EBS AR应收核销取值

若如初见. 提交于 2021-02-04 19:33:51
AR_RECEIVABLE_APPLICATIONS APP, AR_CASH_RECEIPTS CR, AR_PAYMENT_SCHEDULES PS_INV, HZ_CUST_ACCOUNTS CUST, HZ_PARTIES PARTY, RA_CUSTOMER_TRX CT, RA_CUST_TRX_TYPES CTT, RA_CUSTOMER_TRX_LINES CTL, RA_BATCH_SOURCES BS, HZ_CUST_SITE_USES SU, AR_CONS_INV CI, AR_LOOKUPS L_CLASS, AR_RECEIVABLES_TRX ART WHERE APP.DISPLAY = ' Y ' AND APP.CASH_RECEIPT_ID = CR.CASH_RECEIPT_ID AND CT.CUSTOMER_TRX_ID( + ) = PS_INV.CUSTOMER_TRX_ID AND BS.BATCH_SOURCE_ID( + ) = CT.BATCH_SOURCE_ID AND CTT.CUST_TRX_TYPE_ID( + ) = PS_INV.CUST_TRX_TYPE_ID AND CUST.CUST_ACCOUNT_ID( + ) = PS_INV.CUSTOMER_ID AND CUST.PARTY_ID = PARTY

Oracle 12c extended to support varchar2 > 4000 bytes doesn't work for user who is not sysdba

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-04 17:58:25
问题 On oracle 12c compatible 12.0.0, changed to extended with sysdba privileges. I can create a table with varchar2(16000) as column now and insert a string > 4000 bytes; but only when connected as sysdba. When connected as a normal user rather than sysdba, I cannot play with varchar2 >4000 bytes, an error ORA-60019 is thrown. Can anyone explain why? the param max_string_size= extended and compatible=12.0.0 when logged in as a user who is not a sysdba. 回答1: Do following steps and let me know if

mysql主从搭建

南楼画角 提交于 2021-02-04 17:55:53
mysql主从搭建 注意:不同mysql版本之间的binlog日志可能不同,所以应尽量保证mysql的版本一致,如不同,只能是slave的版本高于master版本,因为mysql的版本是向下兼容。 一:环境   mysql版本号:mysql-5.6.16   操作系统:CentOS release 6.8 (Final)   主机:192.168.32.230   主机:192.168.32.231 二:安装mysql,主从步骤一样 [root@Sandos1 local]# tar -xf mysql-5.6.16-linux-glibc2.5-x86_64.tar.gz 100% 291MB 290.7MB/s 00:01 [root@Sandos1 local]# mv mysql-5.6.16-linux-glibc2.5-x86_64 mysql [root@Sandos1 local]# groupadd mysql [root@Sandos1 local]# useradd -g mysql mysql [root@Sandos1 local]# chown mysql:mysql mysql -R [root@Sandos1 local]# cd mysql [root@Sandos1 mysql]# ./scripts/mysql_install_db -