Skip to content
Advertisement

Tag: oracle

Adding a condition to desplay a list of values in Oracle Apex

I need help with putting a condition on a List Of Values in Oracle apex. So I have 2 tables: and The list of values displays v.BROJ_VEZ but returns v.ID_VEZ. The LOV is displayed in the form for the table BRODICE. I want the LOV to display only the v.BROJ_VEZ (returning v.ID_VEZ) where v.MAX_DULJINA > b.DULJINA_BRODICE. How do I do

Oracle SQL to delete the records except last 7 days/1 week

I am using Oracle SQL DB for ERP JD Edwards. Dates are stored in Julian Format for this ERP. We usually use this code to convert date from Julian to normal format. decode(szupmj,0,’ ‘,to_char(to_date(1900000 + olupmj,’YYYYDDD’),’MM/DD/YYYY’)) However we have a requirement where in, all data needs to be deleted except last 7 days. Date column – 7 Please can someone

How to create an ID column based on condition of previous row?

I am trying to group hospital admission transfers, with the initial index admission. So far I have been able to categorize each admission as ‘index’ or ‘transfer’ based on the time since previous discharge. Now I am trying to group together the admissions together that are in the same episode of care (e.g. each index admission and its associated transfers).

Why does (SHAPE).SDO_ORDINATES(1) syntax fail, but (SHAPE).ST_PointN(1) succeeds?

Oracle 18c: In a related question, we determined: The syntax of extracting collection elements by index is not supported in SQL. So a query that uses this syntax will fail: (shape).sdo_ordinates(1), Source: Why does SHAPE.SDO_ORDINATES(1) work in PL/SQL, but not in SQL? However, I have a query that is similar (different datatype) that succeeds when I use seemingly similar syntax:

How to optimize the performance of the following SQL query?

For the following query , I tried creating index on table tmp.req_index_cont_t with columns indcont_key_1 and ind_no but still optimizer is performing full table scan , I am not getting how to resolve this issue , please guide : Answer There’s not enough information here to answer your question. Why do you think a full table scan is not the

Can you help me to correct this query in sql

ERROR at line 1: ORA-00979: not a GROUP BY expression Answer You are getting this error for WEIGHT_IN_PERCENTAGE. If WEIGHT_IN_PERCENTAGE is same for every row in a group you can use (SUM(POINTS) * max(WEIGHT_IN_PERCENTAGE)) or you can SUM(POINTS*WEIGHT_IN_PERCENTAGE) multiply it with POINTS before sum: OR

Returning multiple XML from ref cursor oracle

There is a procedure in the Oracle DB which takes a date range and generates XML file for each day and the return type is ref cursor. When the procedure is called from C# code, I am unable to extract the XML from the cursor. Any pointers will be helpful on how to extract the XML Below given is the

Advertisement