I have column Explanation (VARCHAR2) in table: No| Explanation 1 | Shipment of cabbage by agreement 29.04.2019 TAX Free 2 | Payment for screws (01.04.19) Tax: 13.55 % 3 | For reserch by deal …
Tag: oracle
How to get totals from another table
I have table 1 of Cars and table 2 Trips. Below are the two tables fields –CARS table car_id (PK), car_model, car_miles –TRIPS table trip_id (PK), trip_destination, trip_date, trip_miles, car_id (…
Is it possible to delete duplicate rows from a table without knowing it’s columns?
Is there a way to delete all the duplicate rows from an arbitrary table in a database when you don’t know the table’s structure (it’s columns) using only plain SQL (without using PL/SQL)? — The code …
What is wrong with this running total (cumulative column) in Oracle select with a window function?
I have a query containing 0 or 1 in a column. For demonstration purposes I replaced the 1 with 77 so its more easy to see: select dates.d the_date , case TO_CHAR(dates.d, ‘d’) when ‘7’ then 0 when ‘1’…
how to use select into to insert many records
i have a stored procedure that will copy data from table A to table B and return id that is generated from table B to update table a record . this is sample data table A is : id—-Name—refId—…
Creating a new column using the result set from union all – sql
I have TWO simple VIEWS with columns PID and NAME respectively. Here’s how they are connected to each other. View1: PID NAME Comp1 , C1 Comp2 , C2 View2: PID NAME ParentPID …
oracle: remove only blank lines
How to remove empty lines in sql or plsql Input select ‘test1 test2 test3 test4’ from dual; Expected output: test1 test2 test3 test4 TRANSLATE is removing all the new line character
How can I ‘flatten’ a one to many table with URLs so that each additional URL shows up in a new column?
I’m trying to ‘flatten’ a one to many relationship using SQL to create a CSV of points and their associated photos to use with a web map. Table 1 is a list of points and their locations, and Table 2 …
Select distinct by one column in Oracle but displaying multiple columns too
I have this query: select DISTINCT cpc.EXTRACT_ID, cpc.OS_ID,…,cpvi.VOYAGE_STRT_DT, cpob.FISCAL_MONTH_START_DT from CPOB_PROCESS_CTRL cpc inner join CPOB_PLY_OUTSTD_BAL cpob on cpc….
Dividing a sum value into multiple rows due to field length constraint
I am migrating financial data from a very large table (100 million+ of rows) by summarizing the amount and insert them into summary table. I ran into problem when the summary amount (3 billions) is …