I have table with values like this ID |Name |Balance |Type |ProductName 1 Abdol 10000 1 RAID100 2 HIVE 5000000 2 RAID100 3 Ade 20000 …
Tag: oracle
Parse xmltype into table after pivot xml
i have return XMLTYPE after pivot xml that looks like Ukraine 12345
Selecting default row if no rows return with join condition values from other tables
I have two tables ORDERS and RATE: and I would like to get the costs of all the orders in table ORDERS, given that a default rate of 10 is used for those orders which do not have rates in the RATE table for the corresponding ids, and if an id is available in the RATE table, but no rate
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:
Oracle – Concatenate calculated number field with string field
In this case statement below, I want the result to be a string, either ‘n days’ or ‘n weeks’ based on the conditions in the statement. How can I concatenate the number generated from ABS(FLOOR(TRUNC(i.schedule_finish) – TRUNC(sysdate))) with a string (that is, ‘ days’…
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…
How to extract time in HH24:MM from varchar in Oracle
I have a column in the following varchar format. I would like to extract the time based on a condition e.g. < 7:00. Table1 Column: timer(varchar) 23:45 05:00 07:00 22:00 Expected output test ...
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…
how to resolve this type of error when inserting a new row in a table?
CREATE OR REPLACE TYPE hypothesis AS TABLE OF VARCHAR2(20); / CREATE OR REPLACE TYPE Hypoth_pr AS OBJECT (prob_content VARCHAR2(20), pr NUMBER); / CREATE OR REPLACE TYPE Hypoth_po AS OBJECT (…