Skip to content

Tag: oracle

Oracle UNION depending an IF conditon

I have to make a SQL query wraping all of theses statements: First, I have a first SQL query like this: Then, I have another SQL statement like this: Finally, based on the first SQL statement, I have to add a row of fake data on the result of the second statement if NbOfEntries > 0. I have to add

2 columns one below another in sql

I’m getting this error ORA-12704: character set mismatch can you please help me to fix this Answer See whether this helps. I presume that this is your situation: This is your current query: This is what you might try to do – apply the to_char function to a nvarchar2 column:

Work Around for PL/SQL to do column validation

I need to create a procedure to validate number of digits between 2 columns. I have some reason that this handling won’t do in Java so it needs to be a stored procedure. It first will get the template(result_format) from one of my table and itself contain data like then the argument P_RESULT will have i…

Self Joining between 2 same tables

For instance I have a table called employees where it consists of “Employee ID”, “First Name”, “Last Name”, “Manager ID”. To count the subordinate of each manager, I tried to self-joining between the 2 tables. Am I right? Also, if I want to join with other table…