Skip to content

Tag: oracle

PL/SQL: Function returned without value

I wrote below FUNCTION to check given data is exist. It is working before but when i add new data on table named iqa_department it suddenly after triggering the function returns me with that error, im kinda new in oracle fom mysql to oracle Here’s how i call it. error i’m getting Answer try this:

Conditionally joining from multiple tables

Does SQL allow some form of conditional “table choosing” within the Join statement? ie. selecting a different table to join based on a predefined variable/condition. The error I get when attempting this method is ORA-00905: missing keyword. Answer No. Neither SQL nor Oracle allow this, unless you …

format date in oracle SQL

I was trying to learn how to format date in oracle pl oracle, when I ran below query its returns error Answer for my scenario I had to use to_char which perfectly solve the formatting issue.

SQL Count In Range

How could I count data in range which could be configured Something like this, Table ZONE_CFG is configurable, so I could not use static value for this The DATE column mean maximum date for each ZONE And the result what I expected : Please could someone help me with this Answer You can use LAG and group by as…

How to bind variable in string in SQL query?

I am using SQL Developer. When I want to bind value. Normally I use following syntax: but, I don’t know how to do that in string. The following query does not work. Why do I need it? Because my program runs a query in python and assigns something to bind variable: Answer Concatenate the prefix/suffix wi…