So I am currently using my account with username: ctxsys and a password In this account I have table named archiv11. In another account named d5a11 with a password I have a table called fileLocation …
Tag: oracle
Bad bind variable error in store procedure – PL/SQL – Oracle
CREATE OR REPLACE PROCEDURE demoStoreProc ( stringNums IN VARCHAR2 ) AS stepCount NUMBER; BEGIN SELECT REGEXP_COUNT (stringNums ,’,’)+1 INTO :stepCount FROM “SYS”.”DUAL” ; END So in the …
Select JSON object that appears more than one time
I am trying to write a query to return all trains that have more than one etapesSupervision. My table has a column called DETAIL, in this column I can find the JSON of my train. “nomTrain”: “EVOL99″…
Coalesce(null,”) gets null in Oracle and gets ” in SQL Server?
Oracle version : 12.1.0.2.0 SQL Server version : 2012 My code: in Oracle returns null result, but in SQL Server returns a ” result. Why did this result differ? They are ANSI standards, shouldn’t it be the same? Answer In Oracle document about NULL Oracle Database treats a character value with a le…
Oracle update and change few columns records in two tables with a single query
I have two tables with names of Locations and Countries in My Oracle database. Locations table has columns with names location_id(fk), street_address, state_province, and country_id. Countries table …
How to combine monthly results into a single row?
If have a sales table with data like: SALES —– seller_id month amount 1 1 10 1 2 15 I would like to retrieve all seller’s sales in a single row. How can I combine the …
regexp_like that mirrors contains near
I’m trying to speed up a query that uses Contains Near with one that uses regexp_like. The initial Contains Near query takes about 45 minutes to run. Clob Column holds large “documents” and is …
To_CHAR(ADD_MONTHS(TRUNC(TO_DATE(’10-04-10′,’RR-MM-DD’), ‘YY’), -1), ‘Q’)
I trying to break the statement part by part to understand but it seem having some error. Appreciate if someone can explain this to me. Thanks select To_CHAR(ADD_MONTHS(TRUNC(TO_DATE(’10-04-10′,’RR-…
Returning all dates in dd/mm/yy format from the past 6 months
I am looking to return all days from the past 6 months. Per example: Column1 ——- 01-OCT-18 30-SEP-18 29-SEP-18 …….. 01-APR-18 @TimBiegeleisen – Your solution pointed me in the right …
sql (oracle) count and sum within the same select/where query
With reference to the following and correctly answered question: sql (oracle) counting number of overlapping intervals Given the following table test in an oracle sql database: +—-+——+——-+-…