SQL query, create groups by dates

This is my initial table, (the dates are in DD/MM/YY format) ID DAY TYPE_ID TYPE NUM START_DATE END_DATE —- ——— ——- —- —- ——— ——— 4241 15/09/15 2 1 66 01/01/00 31/12/99 4241 16/09/15 2 1 66 01/01/00 31/12/99 4241 17/09/15 9 1 59 17/09/15 18/09/15 4241 18/09/15 9 1 59 17/09/15 18/09/15 4241 19/09/15 2 1 66 01/01/00 31/12/99…
Read more

Configuring firewall in oracle linux server [on hold]

i’m not able to configure the firewall in oracle linux server which came with “Oracle DB Developer VM” for mac os x. i’ve installed virtual box in mac os x. I imported OTN_DEVELOPER_DAY_VM.ova in Virtual Box. I tried to configure firewall. but there was no option to do that. Source: oracle

Oracle Recursive Subquery Factoring convert

I’m trying to use this recursive SQL feature but can’t get it to do what I want, not even close. I’ve coded up the logic in an unrolled loop, asking if it can be converted into a single recursive SQL query, not the table update style I’ve used.!4/b7217/1 There are six players to be ranked. They have id, group…
Read more

An error in my simple Mapping using asplit and two targets

my problem is when I run a simple mapping using a source (Plat File), a Split and two targets (two oracle tables), I get an error in Validations Results like : The physical node FAP_1 cannot be supported by technology Oracle on execution unit ORACLE_RETENTION_UNIT of mapping Mapping Map_364_2[141] owning folder=GCA.PRD03. Source: oracle

If table doesn’t exists then insert into other table

I have procedure like: create or replace procedure smth is some_variable varchar(2; begin insert into **table**(col1,col2) (Select id,’text’ from TABLE2), insert into table(col1,col2) (Select id,’text’ from TABLE3) What I want to do is put some if-else (or smoething else) statement for the case when eg. Table2 doesn’t exists. If Table2 doesn’t exist then insert into table (‘smth’,’nameoftable’). I know exactly…
Read more

What exactly does trunc(date, ‘IW’)?

For my project I need to have an absolute numerical correspondence between days of the week and 1…7 values. As you probably know the association between days and numbers can vary according to the locale, for example in Germany monday is 1 and sunday is 7, while in US monday is 2 while sunday is 1. So, searching for a…
Read more

Order by causing slower select in Oracle

I have a table that will have transaction records inserted by various program, and i shall process them one by one. The records are selected one by one, and there is a priority field where the lowest number shall be processed first. My current query: SELECT * FROM (SELECT CODE,NAME,TYPE,START_DATE, LANGUAGE, PRIORITY, SOURCE FROM TBL_INQUEUE ORDER BY PRIORITY) q WHERE…
Read more

sql creating table with constraints

When I’m run this code getting error saying, SQL Error: ORA-00905: missing keyword 00905. 00000 – “missing keyword” *Cause: *Action: Running it on ORACLE. Not sure how to fix it. CREATE TABLE LAB4 ( ROOMID1 NUMBER(8) NOT NULL, BUILDING1 VARCHAR2(25) NOT NULL, ROOMNO1 VARCHAR2(25) NOT NULL, CONSTRAINT ROOMPK1 PRIMARY KEY(ROOMID1)); CREATE TABLE BOOKING ( BOOKINGID NUMBER(4) NOT NULL , DAYOFWEEK…
Read more

How to capture 20 digit numeric or floating number to number field in oracle

I got a requirement to validate the number field which can occupy 20 numeric digits or 16 numeric digits and 4 decimal point values maximum. And also + and – signs shouldn’t be calculated in this 20 digits. Examples: 12345678901234567890 – Pass +12345678901234567890 – Pass -12345678901234567890 – Pass 1234567890123456.7890 – Pass +1234567890123456.7890 – Pass -1234567890123456.7890 – Pass -12345678901234567.890 – Pass…
Read more