You have a cursor, so my_table_name is a row/record from that cursor. You need to refer to the column/field in that:
...
WHERE segment_name=my_table_name.table_name;
But you also need to select into...
You can split the string into individual characters and then use MATCH_RECOGNIZE (from Oracle 12 onwards) to perform row-by-row pattern matching to look for consecutive ASCII values:
SELECT value
FROM...
Use conditional aggregation:
SELECT COUNT(CASE WHEN LOWER(nazwisko) LIKE '%a%' THEN 1 END) as "Ile nazwisk z A",
COUNT(CASE WHEN LOWER(nazwisko) LIKE '%e%' THEN 1 END) as "Ile nazwisk z E"
FROM...
You need a conditional aggregation query for this -
WITH data AS (SELECT '001' EMPLOYEE, 'Basic' ELEMENT, 100 VALUE, 'Sales' DEPT FROM dual UNION ALL
SELECT '001', 'Rent', 300, 'Sales' F...
Find first row using the FIRST_VALUE analytic function and then use the SUM analytic function to find a cumulative total and subtract:
SELECT id,
dt,
amount,
-- Find the first...
In Oracle, a DATE is a binary data-type that consists of 7 bytes representing century, year-of-century, month, day, hour, minute and second. It ALWAYS contains those 7 components and it is NEVER store...
Lost your password? Please enter your email address. You will receive a link to create a new password.
Donate
Thank you for visit here to donate to us, you think it's just a cup of coffee, but with us, it's really meaningful and contributes to help this blog grow more and more.
You can support us in one of the ways below: