oracle11g

java.sql.SQLException: ORA-00917: missing comma

最后都变了- 提交于 2020-01-06 01:16:13
问题 I'm pulling my hair out trying to find the cause of the SqlExcpetion below. I'm using Oracle Database 11g Express and SqlDeveloper. I've looked through other posts, but so far no help. java.sql.SQLException: ORA-00917: missing comma at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513) at oracle

Move Non-NULL Values Up Within Partition

十年热恋 提交于 2020-01-05 17:19:41
问题 Not sure if the title makes sense but here is my problem and how I got to where I am. Background: I have 2 tables in a one-to-many setup. The many table can have any number of records that tie back to the one but has an additional column that can identify the many record as anything between a value of 1-7. I "gathered" all the rows for each group 1-7 with 7 CTE's and then joined them together to the one table getting me to the point of my sample data. If all of the rows in a single column are

Oracle query to get the number of business days between 2 dates, excluding holidays

…衆ロ難τιáo~ 提交于 2020-01-05 14:11:50
问题 We are using Oracle 11. In our CASE WHEN statement, I need to check if the number of days between the 2 dates are > 3 business days (so excluding weekends and holidays). CASE WHEN end_date - start_date > 3 THEN 0 --> this includes weekend and holidays WHEN CODE = 1 THEN 1 WHEN CODE =2 THEN 2 ELSE 3 END AS MyColumn Say I have a holiday calendar table that has column HolidayDates that contains all the holidays, for ex: 12/25/2018, 12/31/2018, etc. HolidayDates 12/25/2018 12/31/2018 So, if Date1

Oracle query to get the number of business days between 2 dates, excluding holidays

北慕城南 提交于 2020-01-05 14:11:06
问题 We are using Oracle 11. In our CASE WHEN statement, I need to check if the number of days between the 2 dates are > 3 business days (so excluding weekends and holidays). CASE WHEN end_date - start_date > 3 THEN 0 --> this includes weekend and holidays WHEN CODE = 1 THEN 1 WHEN CODE =2 THEN 2 ELSE 3 END AS MyColumn Say I have a holiday calendar table that has column HolidayDates that contains all the holidays, for ex: 12/25/2018, 12/31/2018, etc. HolidayDates 12/25/2018 12/31/2018 So, if Date1

Java: How to print stored procedure data from Oracle

泪湿孤枕 提交于 2020-01-05 13:12:49
问题 How to System.Out.println stored procedure witch i have created in Oracle database. As you can see, stored precedure returns database version banner. Now i want to print that banner in java console. My stored procedure is: CREATE OR REPLACE PROCEDURE getVersion (out_cursor OUT SYS_REFCURSOR) AS BEGIN OPEN out_cursor FOR SELECT * FROM V$VERSION; EXCEPTION WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.put_line (SQLERRM); WHEN OTHERS THEN DBMS_OUTPUT.put_line (SQLERRM); END getVersion; Java code: System

Designing Simple Schema for Disaggregation of Demand Forecast

蓝咒 提交于 2020-01-05 07:38:55
问题 Edit : [ Details ] I am doing a simple database design task as a training exercise where I have to come up with a basic schema design for the following case: I have a parent-child hierarchy of products (Raw Material > Work in Progress > End Product). Orders are placed at each level. Number of orders shall be viewable in weekly buckets for the next 6 months. Demand forecast can be made for each product level. Demand forecast is done for weekly buckets, for the next 6 months. It's usually done

C# Connect to Oracle DataBase Error ORA-12545: Connect failed because target host or object does not exist

*爱你&永不变心* 提交于 2020-01-05 06:28:53
问题 I want to connect to Oracle database from C# but I can't Because this errors that ORA-12545: Connect failed because target host or object does not exist so how can i ? C# code string strConn = "Data Source =(DESCRIPTION =" + "(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-EIQ5MRF)(PORT = 1521))" + "(CONNECT_DATA =" + " (SERVER = DEDICATED)" + "(SERVICE_NAME = XE)" + ")" + ");User Id =system;password=bluesky;"; OracleConnection conn = new OracleConnection(strConn); conn.Open(); conn.Close();

convert %S to null in plsql

為{幸葍}努か 提交于 2020-01-05 05:32:06
问题 I observe a problem after migrating my oracle form 6i to 11g. In a form I am generating windows batch command. part of the command is as below: declare lv_content5c varchar2(300); begin lv_content5c:= '@Set sizeout2=%sizeout2:bytes=%'; CLIENT_TEXT_IO.PUTF(out_file,lv_content5c); CLIENT_TEXT_IO.PUTF(out_file, CHR(10)); CLIENT_TEXT_IO.FCLOSE(out_file); client_host('cmd /c start '|| lv_filename); end; it seems that when I store this text "'@Set sizeout2=%sizeout2:bytes=%'" in file oracleForm or

Loading CSV file data into a Table Variable (Index-by table) in Oracle

左心房为你撑大大i 提交于 2020-01-05 05:27:33
问题 My requirement is that I need to read the CSV file data and query it with one existing table in the Database to update some records. One approach I thought that to create a new table (temp) and load the CSV file into that table and query that with the existing table but I found that I don't have permission to create a new table or a directory (for external table approach). Then I thought of doing this through a table variable but I'm not getting how to load the data into a table variable. I

Loading CSV file data into a Table Variable (Index-by table) in Oracle

丶灬走出姿态 提交于 2020-01-05 05:27:08
问题 My requirement is that I need to read the CSV file data and query it with one existing table in the Database to update some records. One approach I thought that to create a new table (temp) and load the CSV file into that table and query that with the existing table but I found that I don't have permission to create a new table or a directory (for external table approach). Then I thought of doing this through a table variable but I'm not getting how to load the data into a table variable. I