Data dodania Pytanie
2017-08-15 19:08 Why does manually running SQL block work but using EXECUTE IMMEDIATE on the same string doesn't? »
The following procedure is failing with a "ORA-0097: missing equal sign error". CREATE PROCEDURE AMEPSA.USP_ETL_BATCH_MASTER_UPDATE (ENVIRONM...
(1) odpowiedzi
2017-08-15 16:08 Selecting rows based on values in one of its semi-colon delimited columns: PL/SQL »
I'm currently trying to select all rows where a certain ID exists within that rows semi-colon delimited ID column. The Table: ===================== ...
(1) odpowiedzi
2017-08-15 15:08 Put many columns in group by clause in Oracle SQL »
In Oracle 11g database, Suppose we have table, CUSTOMER and PAYMENT as follows Customer CUSTOMER_ID | CUSTOMER_NAME | CUSTOMER_AGE | CUSTOMER_CREAT...
(4) odpowiedzi
2017-08-14 20:08 When and why does the TRUNC(DATE, [FORMAT]) used in the real world »
I am getting into Oracle database. I came across the TRUNC(DATE, [FMT]) function. I am not really clear on it except it seems to return the beginning ...
(3) odpowiedzi
2017-08-14 17:08 Oracle SQL: Sampling a large number of rows from a table »
I want to extract a roughly 5 million row sample from a table that will contain somewhere between 10 million and 20 million rows. Due to the large nu...
(2) odpowiedzi
2017-08-14 16:08 Oracle ORA-04030 even when using Bind Variables in a LOOP »
I have to delete almost 500 million rows from a remote table using PL/SQL. Since the UNDO tablespace cannot handle the volume, the deletes are being d...
(3) odpowiedzi
2017-08-13 22:08 Why this query requires group by clause in Oracle »
can someone explain me why this query requires GROUP BY clause in Oracle while is perfectly fine in MSSQL, MySQL, Postgresql? select count(*) / (sele...
(1) odpowiedzi
2017-08-13 22:08 SQL query to interpolate timestamp basing on adjacent records »
I use Oracle and have the following table: create table test as select to_date('02.05.2017 00:00', 'DD.MM.YYYY HH24:MI') as DT, 203.4 as VAL from dua...
(4) odpowiedzi
2017-08-13 15:08 Update table in a SQL database »
I am trying to add a column in my table which maps some values in another column to the new column. (Population is another column that I have) This is...
(2) odpowiedzi
2017-08-12 17:08 Create Table from View - Oracle SQL SQL Error: ORA-01723: zero-length columns are not allowed »
I need to create a table from view with statement like CREATE TABLE NEW_TABLE AS SELECT * from VIEW It is giving error message as below. ...
(1) odpowiedzi
2017-08-12 08:08 Subscript outside of limit »
I tried several times in my cmd running this code but every time it says subscript out of limit at line 1 at the Declare but I haven't found any probl...
(1) odpowiedzi
2017-08-12 03:08 Oracle case running all prompts »
I've made this program and I was wondering why oracle prompts for input even when it does not run the 'D' case (when 'A' is imputed for example). SET...
(1) odpowiedzi
2017-08-11 21:08 Oracle - Creating chain of values and calculate cumulative count »
I have an oracle table DM_TEMP_SUMMING_DVC_BY_FW with below columns and sample data. Data below shows -dmc_id ='408' there are 2109 devices whic...
(1) odpowiedzi
2017-08-11 16:08 ORACLE Find Date ('DD-MON-YYYY') of a given weekday in the past 7 days »
i am trying to create a view that compares a SCHEDULE table that has values such as ('Daily', 'Wednesday', 'Tuesday', etc..) and another table (REPORT...
(2) odpowiedzi
2017-08-11 09:08 Oracle SQL: Extracting the week of the year from date gives random results »
I have been using the following statement to get the week of the year from a date: TO_CHAR(TO_DATE(tbl.col,'YYYY/MM/DD'),'IW') AS week Now I'm rece...
(2) odpowiedzi
2017-08-10 23:08 How to negate inside a case »
I'm a bit new in plsql, so could you tell me it exists a way to negate a case? I mean, this way: select CASE DENOM_CURRENCY_CODE WHEN !=...
(1) odpowiedzi
2017-08-10 12:08 How to handle forward slash(/) in java jdbc while querying for a particular value? »
Below is my query which is successfully working in command window but in JDBC I am unable to get the result set for this. select * From Elp_Dealer_Re...
(1) odpowiedzi
2017-08-10 11:08 Right/Left Outer Join in from() and many 'and' with four tables in JOOQ »
I am a noob in JOOQ and need help to translate SQL to JOOQ. So I have this long SQL statement here: Please see this pic for a better insight: Outer J...
(1) odpowiedzi
2017-08-09 21:08 PL/SQL Add Multiple Columns to Query with Single Function »
Is there any way to accomplish something like this in PL/SQL... select a.col1, a.col2, a.col3, myFunc(a.id) from myTable a; and the result be more ...
(2) odpowiedzi
2017-08-09 16:08 Oracle SQL multiple left joins with duplicate records or "invalid identifier" »
I'm fairly new to SQL and have done some joins before but nothing as complex as this. Basically, what I'm trying to do is to join together many tabl...
(1) odpowiedzi
2017-08-09 13:08 Can not return table type from a function PLSQL »
I have defined record type, table type and function inside package specification. TYPE name_RECORD IS RECORD ( name VARCHAR2(244), surname VARCHAR...
(1) odpowiedzi
2017-08-08 16:08 How can I improve query performance for CLOB and LONG values in Oracle-DB (cx_Oracle vs OJDBC)? »
I have performance problems when querying CLOBs and LONGs of big Oracle database tables. So far, I wrote the following unit tests with cx_Oracle (pyt...
(1) odpowiedzi
2017-08-08 13:08 Oracle SQL primary key stuck »
I ran into a curious problem. I am creating copies of currently existing tables and adding partitions to them. The process is as follows: Rename c...
(1) odpowiedzi
2017-08-08 11:08 How scn map to timestamp using sys.smon_scn_time in Oracle? »
In Oracle DB you can find out when your table was updated last time by using SELECT SCN_TO_TIMESTAMP(MAX(ora_rowscn)) from myTable; (see here) Va...
(0) odpowiedzi
2017-08-07 23:08 Oracle outer join and constant values »
====== Original question ====== I've multiple outer joins on constants as below in the SQL: select .. from CLAS MDP, CLAS ORG_CNTRY, CLAS BEN_CNTRY ...
(2) odpowiedzi
2017-08-07 20:08 Add a new colum with the diff of two values »
sql is goofy sometimes ain't it? Right now I want to take two values from different column and compare the difference. Ex: ColA |ColB| New collum 1 ...
(3) odpowiedzi
2017-08-07 09:08 Check if time is between two times »
i want to do the following in SQL : I have three shifts: Shift 1 : 07:00 - 14:59 Shift 2: 15:00 - 22:59 Shift 3: 23:00 - 06:59 I want to...
(2) odpowiedzi
2017-08-06 19:08 Why my spring boot gradle project with spring jpa connecting to oracle throwing exceptions? »
RestController is setup and the project is running but it is throwing such errors. without the jpa and spring hibernate configurations its starting fi...
(1) odpowiedzi
2017-08-06 17:08 No privileges to gather table stats »
I have an oracle package with a procedure that create table, than it grant priviliges on it. The code is just similar to this: Begin Execute immedia...
(1) odpowiedzi
2017-08-06 11:08 Oracle partition performance »
I have a large oracle table with more than 600 million records and we just repartitioned them so that we can purge some of the old data with out incr...
(1) odpowiedzi
2017-08-05 17:08 Oracle exp, export with multiple queries »
Suppose I have 2 tables, TABLE_A and TABLE_B in production database, their primary keys are A_ID and B_ID respectively. I want to export a row from T...
(2) odpowiedzi
2017-08-05 05:08 Error ORA-02291: Integrity Constraint - 1:1 instead of 1:M? »
I see that the parent key isn't found. In my case, both FK_PLAYERTEAM and FK_PLAYERPOSITION. I noticed that everywhere I see this error, it's an order...
(1) odpowiedzi
2017-08-05 05:08 simple random sampling while pulling data from warehouse(oracle engine) using proc sql in sas »
I need to pull humongous amount of data, say 600-700 variables from different tables in a data warehouse...now the dataset in its raw form will easily...
(2) odpowiedzi
2017-08-04 22:08 PL/SQL transactions when invoking procedures »
I have 2 tables in a master-detail composition, User and Employee (this is because Employee is a type of user and there are other types of users). Whe...
(2) odpowiedzi
2017-08-04 18:08 convert number from scientific notation in R »
I have a numeric variable imported from Oracle with 17 numbers, for example: 20172334534654667. Now I imported it from Oracle using dbGetQuery() in R...
(1) odpowiedzi